1 | <?php |
||
18 | abstract class AbstractRenderer |
||
19 | { |
||
20 | /** |
||
21 | * @var ConfigInterface config object |
||
22 | */ |
||
23 | protected $_config; |
||
24 | |||
25 | public $normalizeOptions = []; |
||
26 | |||
27 | public function __construct(ConfigInterface $config) |
||
31 | |||
32 | public function setHistory($value) |
||
37 | |||
38 | public function getHistory() |
||
42 | |||
43 | /** |
||
44 | * Renders history to string. |
||
45 | * @param History $history |
||
46 | * @return string |
||
47 | */ |
||
48 | abstract public function render(History $history); |
||
49 | } |
||
50 |
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: