Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function loadRoutes(array $routes) |
||
43 | { |
||
44 | foreach ($routes as $pattern => $definition) { |
||
45 | $method = $definition[0]; |
||
46 | $handler = $definition[1]; |
||
47 | $default = isset($definition[2]) ? $definition[2] : []; |
||
48 | $this->addRoute(new Route($method, $pattern, $handler, $default)); |
||
49 | } |
||
50 | return $this; |
||
51 | } |
||
52 | |||
79 |