1 | <?php namespace Magestead\Helper; |
||
8 | class Config |
||
9 | { |
||
10 | protected $_projectPath; |
||
11 | |||
12 | /** |
||
13 | * Config constructor. |
||
14 | * @param OutputInterface $output |
||
15 | */ |
||
16 | public function __construct(OutputInterface $output) |
||
21 | |||
22 | /** |
||
23 | * @param $name |
||
24 | * @return mixed |
||
25 | */ |
||
26 | function __get($name) |
||
30 | |||
31 | /** |
||
32 | * @param OutputInterface $output |
||
33 | * @return bool|mixed |
||
34 | */ |
||
35 | protected function getConfigFile(OutputInterface $output) |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | * @throws MissingConfigFileException |
||
50 | */ |
||
51 | protected function readConfigFile() |
||
59 | } |
||
60 |
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: