| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function load($resource, $type = null) |
||
| 16 | { |
||
| 17 | if (true === $this->loaded) { |
||
| 18 | throw new \RuntimeException('Do not add the "alpixel_cms" loader twice'); |
||
| 19 | } |
||
| 20 | |||
| 21 | $collection = new RouteCollection(); |
||
| 22 | |||
| 23 | $resource = '@AlpixelCMSBundle/Resources/config/routing.yml'; |
||
| 24 | $type = 'yaml'; |
||
| 25 | |||
| 26 | $importedRoutes = $this->import($resource, $type); |
||
| 27 | $collection->addCollection($importedRoutes); |
||
| 28 | |||
| 29 | $this->loaded = true; |
||
| 30 | |||
| 31 | return $collection; |
||
| 32 | } |
||
| 33 | |||
| 39 |