Untitled

PHP Detected Guest 27 Views Size: 539 bytes Posted on: Oct 9, 25 @ 8:19 PM
  1. 1abstract class AbstractProcessor implements ProcessorInterface {
  2. 2 protected mixed $data; // or properties..
  3. 3 protected mixed $processedData;
  4. 4
  5. 5 public function getData(): void {
  6. 6 $this->data = $this->_getData(/* db.. */);
  7. 7 }
  8. 8
  9. 9 public function processData(): void {
  10. 10 $this->processedData = $this->_processData($this->data);
  11. 11 }
  12. 12
  13. 13 // similar methods
  14. 14
  15. 15 abstract protected function _getData(/* args */): mixed;
  16. 16 abstract protected function _processData(mixed $data): mixed;
  17. 17 // etc
  18. 18}

Raw Paste

Comments 0
Login to post a comment.
  • No comments yet. Be the first.
Login to post a comment. Login or Register
We use cookies. To comply with GDPR in the EU and the UK we have to show you these.

We use cookies and similar technologies to keep this website functional (including spam protection via Google reCAPTCHA or Cloudflare Turnstile), and — with your consent — to measure usage and show ads. See Privacy.