| Conditions | 5 |
| Paths | 16 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function run() |
||
| 33 | { |
||
| 34 | $params = $this->params; |
||
| 35 | |||
| 36 | if (sizeof($params)) { |
||
| 37 | $this->primary = explode('-', array_shift($params)); |
||
| 38 | } |
||
| 39 | if (sizeof($params)) { |
||
| 40 | $this->relation = array_shift($params); |
||
| 41 | } |
||
| 42 | if (sizeof($params)) { |
||
| 43 | $this->relationId = array_shift($params); |
||
| 44 | } |
||
| 45 | |||
| 46 | // OPTIONS |
||
| 47 | if ('OPTIONS' == $this->method) { |
||
| 48 | Response::setHeader('Allow', join(',', array_keys($this->map))); |
||
| 49 | return null; |
||
| 50 | } |
||
| 51 | |||
| 52 | // dispatch controller |
||
| 53 | return parent::run(); |
||
| 54 | } |
||
| 55 | } |
||
| 56 |