1 | <?php declare(strict_types=1); |
||
11 | |||
12 | use Stringable; |
||
13 | |||
14 | /** |
||
15 | * Parent of all models |
||
16 | * |
||
17 | * @author Thomas Gossmann |
||
18 | */ |
||
19 | abstract class AbstractModel implements Stringable { |
||
20 | |||
21 | 23 | /** @var string */ |
|
22 | 23 | protected string $description = ''; |
|
|
|||
23 | |||
24 | abstract public function getName(): string; |
||
25 | |||
26 | /** |
||
27 | * Returns this description |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | 14 | public function getDescription(): string { |
|
32 | 14 | return $this->description; |
|
33 | 1 | } |
|
34 | |||
35 | 14 | /** |
|
36 | 14 | * Sets the description, which will also be used when generating a docblock |
|
37 | * |
||
38 | * @param string|array $description |
||
39 | * |
||
40 | * @return $this |
||
55 |