1 | <?php |
||
35 | class Platform { |
||
36 | |||
37 | /** |
||
38 | * @param IConfig $config |
||
39 | */ |
||
40 | function __construct(IConfig $config) { |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getPhpVersion() { |
||
50 | |||
51 | /** |
||
52 | * @return int |
||
53 | */ |
||
54 | public function getIntSize() { |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getOcVersion() { |
||
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getDatabase() { |
||
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getOS() { |
||
84 | |||
85 | /** |
||
86 | * @param $command |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function isCommandKnown($command) { |
||
93 | |||
94 | public function getLibraryVersion($name) { |
||
99 | } |
||
100 |
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: