| 1 | <?php |
||
| 22 | abstract class AbstractRenderer |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var ConfigInterface config object |
||
| 26 | */ |
||
| 27 | protected $_config; |
||
| 28 | |||
| 29 | protected $normalization = Normalization::class; |
||
| 30 | |||
| 31 | 2 | public function __construct(ConfigInterface $config) |
|
| 35 | |||
| 36 | 1 | public function getConfig() |
|
| 40 | |||
| 41 | 2 | public function setHistory($value) |
|
| 48 | |||
| 49 | 2 | public function getHistory() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Renders history to string. |
||
| 56 | * @param History $history |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | abstract public function render(History $history); |
||
| 60 | } |
||
| 61 |
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: