Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 3 |
1 | <?php |
||
16 | public function processRoute($route, $bindings = [], $withResponse = true) |
||
17 | { |
||
18 | $response = ''; |
||
19 | |||
20 | if ($withResponse) { |
||
21 | try { |
||
22 | $response = $this->getRouteResponse($route, $bindings); |
||
23 | } catch (Exception $e) {} |
||
|
|||
24 | } |
||
25 | |||
26 | $routeAction = $route->getAction(); |
||
27 | $routeGroup = $this->getRouteGroup($routeAction['uses']); |
||
28 | $routeDescription = $this->getRouteDescription($routeAction['uses']); |
||
29 | |||
30 | return $this->getParameters([ |
||
31 | 'resource' => $routeGroup, |
||
32 | 'title' => $routeDescription['short'], |
||
33 | 'description' => $routeDescription['long'], |
||
34 | 'methods' => $route->getMethods(), |
||
35 | 'uri' => $route->uri(), |
||
36 | 'parameters' => [], |
||
37 | 'response' => $response, |
||
38 | ], $routeAction); |
||
39 | } |
||
40 | |||
57 |