| @@ 32-35 (lines=4) @@ | ||
| 29 | switch (true) { |
|
| 30 | ||
| 31 | // accessor ? |
|
| 32 | case strpos($method, 'get') === 0 : |
|
| 33 | return $this->_get(lcfirst(preg_filter( |
|
| 34 | '/^get(.+)/', '$1', $method |
|
| 35 | ))); |
|
| 36 | ||
| 37 | // mutator ? |
|
| 38 | case strpos($method, 'set') === 0 : |
|
| @@ 38-42 (lines=5) @@ | ||
| 35 | ))); |
|
| 36 | ||
| 37 | // mutator ? |
|
| 38 | case strpos($method, 'set') === 0 : |
|
| 39 | return $this->_set( |
|
| 40 | lcfirst(preg_filter('/^set(.+)/', '$1', $method)), |
|
| 41 | $arguments[0] |
|
| 42 | ); |
|
| 43 | ||
| 44 | default: |
|
| 45 | throw new \BadMethodCallException(sprintf('Method %s::%s() doesnt exists.', |
|