1 | <?php |
||
21 | class Config implements \Iterator |
||
22 | { |
||
23 | private $iterPos; |
||
24 | private $basePath; |
||
25 | private $cfgFile; |
||
26 | private $config; |
||
27 | |||
28 | 29 | public function __construct($basePath, $cfgFile = 'conf/sspks.yaml') |
|
73 | |||
74 | /** |
||
75 | * Checks wether an env variable exists and is not an empty string. |
||
76 | * |
||
77 | * @param string $name Name of requested environment variable. |
||
78 | * @return boolean value. |
||
79 | */ |
||
80 | 27 | public function envVarIsNotEmpty($name) |
|
84 | |||
85 | /** |
||
86 | * Getter magic method. |
||
87 | * |
||
88 | * @param string $name Name of requested value. |
||
89 | * @return mixed Requested value. |
||
90 | */ |
||
91 | 26 | public function __get($name) |
|
95 | |||
96 | /** |
||
97 | * Setter magic method. |
||
98 | * |
||
99 | * @param string $name Name of variable to set. |
||
100 | * @param mixed $value Value to set. |
||
101 | */ |
||
102 | 26 | public function __set($name, $value) |
|
106 | |||
107 | /** |
||
108 | * Isset feature magic method. |
||
109 | * |
||
110 | * @param string $name Name of requested value. |
||
111 | * @return bool TRUE if value exists, FALSE otherwise. |
||
112 | */ |
||
113 | 1 | public function __isset($name) |
|
117 | |||
118 | /** |
||
119 | * Unset feature magic method. |
||
120 | * |
||
121 | * @param string $name Name of value to unset. |
||
122 | */ |
||
123 | 1 | public function __unset($name) |
|
127 | |||
128 | 1 | public function rewind() |
|
132 | |||
133 | 1 | public function current() |
|
137 | |||
138 | 1 | public function key() |
|
142 | |||
143 | 1 | public function next() |
|
147 | |||
148 | 1 | public function valid() |
|
152 | } |
||
153 |