1 | <?php |
||
19 | class Config implements \Iterator |
||
20 | { |
||
21 | private $iterPos; |
||
22 | private $basePath; |
||
23 | private $cfgFile; |
||
24 | private $config; |
||
25 | |||
26 | 29 | public function __construct($basePath, $cfgFile = 'conf/sspks.yaml') |
|
71 | |||
72 | /** |
||
73 | * checks wether an env variable exists and is not an empty string. |
||
74 | * |
||
75 | 2 | * @param string $name Name of requested environment variable. |
|
76 | * @return boolean value. |
||
77 | 2 | */ |
|
78 | public function envVarIsNotEmpty($name) |
||
82 | |||
83 | /** |
||
84 | * Getter magic method. |
||
85 | 1 | * |
|
86 | * @param string $name Name of requested value. |
||
87 | 1 | * @return mixed Requested value. |
|
88 | 1 | */ |
|
89 | public function __get($name) |
||
93 | 1 | ||
94 | /** |
||
95 | 1 | * Setter magic method. |
|
96 | * |
||
97 | 1 | * @param string $name Name of variable to set. |
|
98 | * @param mixed $value Value to set. |
||
99 | */ |
||
100 | 1 | public function __set($name, $value) |
|
104 | |||
105 | 1 | /** |
|
106 | * Isset feature magic method. |
||
107 | 1 | * |
|
108 | 1 | * @param string $name Name of requested value. |
|
109 | * @return bool TRUE if value exists, FALSE otherwise. |
||
110 | 1 | */ |
|
111 | public function __isset($name) |
||
115 | |||
116 | /** |
||
117 | * Unset feature magic method. |
||
118 | * |
||
119 | * @param string $name Name of value to unset. |
||
120 | */ |
||
121 | public function __unset($name) |
||
125 | |||
126 | public function rewind() |
||
130 | |||
131 | public function current() |
||
135 | |||
136 | public function key() |
||
140 | |||
141 | public function next() |
||
145 | |||
146 | public function valid() |
||
150 | } |
||
151 |