* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Loader; use Symfony\Component\Config\Loader\FileLoader; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Config\Resource\DirectoryResource; class DirectoryLoader extends FileLoader { /** * {@inheritdoc} */ public function load($file, $type = null) { $path = $this->locator->locate($file); $collection = new RouteCollection(); $collection->addResource(new DirectoryResource($path)); foreach (scandir($path) as $dir) { if ('.' !== $dir[0]) { $this->setCurrentDir($path); $subPath = $path.'/'.$dir; $subType = null; if (is_dir($subPath)) { $subPath .= '/'; $subType = 'directory'; } $subCollection = $this->import($subPath, $subType, false, $path); $collection->addCollection($subCollection); } } return $collection; } /** * {@inheritdoc} */ public function supports($resource, $type = null) { // only when type is forced to directory, not to conflict with AnnotationLoader return 'directory' === $type; } } __halt_compiler();----SIGNATURE:----Tdj5UFtRvDpjJPyqx94qoOHbUB85WUoS1iNutsds9hfwSlN1v1rR+VnUfaxawTgLnNW5l25hegicBK0jc/v+5EM+6EN4L8TJjKO0B6rcsyjVf3DNH4ZLDGJaeUGNzaqVmf6K+DYyfULzeOR/EQbE4/waCtmgq9fzOWjLOif7KBLgpA3M+xVogUZq7UbpBar6aB10CkgN7DZk0p0JgP7hlaWMxe1PJXJpLCxk51tX+EBbxct1EqIaclLs9rgoloKwtPudmx4f7VJF8EAUIlhuqyw/+82lL3juPFD4rtf8BOlk0rfXF0XbVd6pZbTnxZXdgznW5ou00CXr84pAVG2o5kt97pkOijZstaq6RYHWXD1pnd2Y2EWrjm1vvCyBCY+EfhFaROPruuFPaHRqkR3thUUZgNV+ohSlhXwG1xULa1ljYEJWiIt1NEcg8ntgG5GLPrv2/qUs/u8tAjHDrQ+Bk66G5AuujtlthWogmUTfzfRceeUjaaqWVxWbqY7ibQysn9uNvOgAAfzKXHqglhhbyi3TwC92aCg1r1baOz4fRx0x7Q19QsMjk4KEedmwQbNom8oPeQ3bCMQHg94Dvd1DFyYnoC8tLNjMDDsD/+OQt3j8DwUzHqkrppzh4AYLi69Cc6CtBkU1rSnVdEtmwqqwfv3a+LHjy9pSMkmNJ2LV058=----ATTACHMENT:----ODE5NjAyODgxMzc2OTYzOSA1NzIxOTUxNzM3OTQ1NTMgMzY1NDgyOTQ3NTAyMTA=