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