1 | <?php |
||
7 | abstract class AbstractReader implements Configuration |
||
8 | { |
||
9 | protected |
||
10 | $defaultEnvironment; |
||
11 | |||
12 | private |
||
13 | $overridenVariables, |
||
|
|||
14 | $customData; |
||
15 | |||
16 | public function __construct() |
||
22 | |||
23 | public function read($variable, $environment = null) |
||
38 | |||
39 | abstract protected function readRaw($variable, $environment = null); |
||
40 | |||
41 | public function setDefaultEnvironment($environment) |
||
50 | |||
51 | public function getDefaultEnvironment() |
||
55 | |||
56 | public function getAllValuesForEnvironment($environment = null) |
||
78 | |||
79 | public function overrideVariable($variable, $value) |
||
85 | |||
86 | public function setCustomData($customDataName, $value) |
||
93 | |||
94 | private function handleCustomData($value) |
||
103 | } |
||
104 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.