| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function getDispatcher() |
||
| 48 | { |
||
| 49 | // Generic Dispatcher for RestServer |
||
| 50 | return simpleDispatcher(function (RouteCollector $r) { |
||
| 51 | |||
| 52 | foreach ($this->getRoutes() as $route) { |
||
| 53 | $r->addRoute( |
||
| 54 | $route->getMethod(), |
||
| 55 | $route->getPath(), |
||
| 56 | [ |
||
| 57 | "output_processor" => $route->getOutputProcessor(), |
||
| 58 | "class" => $route->getClass(), |
||
| 59 | ] |
||
| 65 | } |