1 | <?php |
||
19 | abstract class AbstractRenderer |
||
20 | { |
||
21 | public $normalizeOptions = []; |
||
22 | |||
23 | 2 | public function setHistory($value) |
|
28 | |||
29 | 2 | public function getHistory() |
|
33 | |||
34 | /** |
||
35 | * Renders history to string. |
||
36 | * @param History $history |
||
37 | * @return string |
||
38 | */ |
||
39 | abstract public function render(History $history); |
||
40 | |||
41 | } |
||
42 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: