| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace cx_newsletter;
- abstract class builder
- implements builder_interface {
- public function __construct() {
- $this->completed = false;
- $this->target = null;
-
- $this->prepare();
- }
- protected abstract function prepare() : void;
-
- protected function complete() : void {
- $this->completed = true;
- }
- public function get() : mixed {
- return $this->target;
- }
- public function is_complete() : bool {
- return $this->target !== null and $this->completed;
- }
- protected bool $completed;
- protected mixed $target;
- }
|