@@ 117-121 (lines=5) @@ | ||
114 | $this->index = 0; |
|
115 | $this->data = array(); |
|
116 | foreach ($array as $key => $value) { |
|
117 | if (is_array($value)) { |
|
118 | $this->data[$key] = new self($value, $this->allowModifications); |
|
119 | } else { |
|
120 | $this->data[$key] = $value; |
|
121 | } |
|
122 | } |
|
123 | $this->count = count($this->data); |
|
124 | } |
|
@@ 165-169 (lines=5) @@ | ||
162 | public function __set($name, $value) |
|
163 | { |
|
164 | if ($this->allowModifications) { |
|
165 | if (is_array($value)) { |
|
166 | $this->data[$name] = new self($value, true); |
|
167 | } else { |
|
168 | $this->data[$name] = $value; |
|
169 | } |
|
170 | $this->count = count($this->data); |
|
171 | } else { |
|
172 | throw new Exception('ZendConfig is read only'); |