| @@ 14-21 (lines=8) @@ | ||
| 11 | $key = strtolower(substr($key, 0, 1)).substr($key, 1); |
|
| 12 | switch ($prefix) { |
|
| 13 | case 'get': |
|
| 14 | if ($this->has($key)) { |
|
| 15 | return $this->get($key); |
|
| 16 | } else { |
|
| 17 | if (!method_exists($this, '__fallback')) { |
|
| 18 | throw new Ajde_Exception("Property '$key' not set in class ".get_class($this)." when calling get('$key')", |
|
| 19 | 90007); |
|
| 20 | } |
|
| 21 | } |
|
| 22 | break; |
|
| 23 | case 'set': |
|
| 24 | return $this->set($key, $arguments[0]); |
|
| @@ 69-74 (lines=6) @@ | ||
| 66 | ||
| 67 | public function get($key) |
|
| 68 | { |
|
| 69 | if ($this->has($key)) { |
|
| 70 | return $this->_get($key); |
|
| 71 | } else { |
|
| 72 | throw new Ajde_Exception("Parameter '$key' not set in class ".get_class($this)." when calling get('$key')", |
|
| 73 | 90007); |
|
| 74 | } |
|
| 75 | } |
|
| 76 | ||
| 77 | protected function _get($key) |
|