| @@ 142-154 (lines=13) @@ | ||
| 139 | return []; |
|
| 140 | } |
|
| 141 | ||
| 142 | private function loadSabrePluginsFromInfoXml(array $plugins) { |
|
| 143 | foreach ($plugins as $plugin) { |
|
| 144 | try { |
|
| 145 | $this->plugins[] = $this->container->query($plugin); |
|
| 146 | } catch (QueryException $e) { |
|
| 147 | if (class_exists($plugin)) { |
|
| 148 | $this->plugins[] = new $plugin(); |
|
| 149 | } else { |
|
| 150 | throw new \Exception("Sabre plugin class '$plugin' is unknown and could not be loaded"); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | private function loadSabreCollectionsFromInfoXml(array $collections) { |
|
| 157 | foreach ($collections as $collection) { |
|
| @@ 156-168 (lines=13) @@ | ||
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | private function loadSabreCollectionsFromInfoXml(array $collections) { |
|
| 157 | foreach ($collections as $collection) { |
|
| 158 | try { |
|
| 159 | $this->collections[] = $this->container->query($collection); |
|
| 160 | } catch (QueryException $e) { |
|
| 161 | if (class_exists($collection)) { |
|
| 162 | $this->collections[] = new $collection(); |
|
| 163 | } else { |
|
| 164 | throw new \Exception("Sabre collection class '$collection' is unknown and could not be loaded"); |
|
| 165 | } |
|
| 166 | } |
|
| 167 | } |
|
| 168 | } |
|
| 169 | ||
| 170 | } |
|
| 171 | ||