*/ class GlobFileLoader extends FileLoader { /** * {@inheritdoc} */ public function load($resource, string $type = null) { $collection = new RouteCollection(); foreach ($this->glob($resource, false, $globResource) as $path => $info) { $collection->addCollection($this->import($path)); } $collection->addResource($globResource); return $collection; } /** * {@inheritdoc} */ public function supports($resource, string $type = null) { return 'glob' === $type; } }