| @@ 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]); |
|
| @@ 59-64 (lines=6) @@ | ||
| 56 | ||
| 57 | public function get($key) |
|
| 58 | { |
|
| 59 | if ($this->has($key)) { |
|
| 60 | return $this->_get($key); |
|
| 61 | } else { |
|
| 62 | throw new Ajde_Exception("Parameter '$key' not set in class " . get_class($this) . " when calling get('$key')", |
|
| 63 | 90007); |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | protected function _get($key) |
|