Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | public function load($resource, $type = null) |
||
18 | { |
||
19 | if ($this->loaded) { |
||
20 | throw new \LogicException('Already loaded'); |
||
21 | } |
||
22 | |||
23 | $collection = new RouteCollection(); |
||
24 | foreach ($this->routes as $name => $route) { |
||
25 | $collection->add($name, $route); |
||
26 | } |
||
27 | |||
28 | $this->loaded = true; |
||
29 | |||
30 | return $collection; |
||
31 | } |
||
32 | |||
59 |