* * 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:----or/hMUhD0RDbaDfUfp/LPh7AufH1p+pTwR/7JyV0LBhIkWcMGkNFWxKPKGgTGQg9czEjizn9Grf9tQG0xRy4OwLz89U52Cq/P6/PaRrKcxtJjwOBwEZqefrjI9VGYa33n+xjJVPL8pi329N3x7n5G2Iztv0rQ1q05rbt+lcTyvdmGwp+0Qm5PsvdB78ZeyJ00MoDCuiZox7AfBtX6tYtj5D3uqZIHBg5efFnmX9auMfgP/bGFVr+dkwSOK6u9vFDVbJiuZT5I9xo24gsnSe8Wa8rijwo6Z9TjcELwEEUqlDGPJMGyp6C+nKDLr1531qJFaofLRT0pRHhBqOjvo4z0mj6vurOwgShirNa2HrwJE5ZrNP6mczaMsGKOdjvz9eHBCe1woQvxB1FCrO+QkZbxKJGE8YntY//XmX9J4G+7DcELdY8HW4R/x1WkMp3EEPCnRYIDjA6hkF7jCGNxo2CIOMzmnIerdX6ISxlca+WEMKDYb0HaSWuymrRSyEZTkc/UjbMzPIPNz3k6oXUS/O9s9MeS3RJhPtWdgohsFO+Jv5ElH6ExGF7cvG7c+hMRdJV5y6q3JjZ9A9tqXFKxbDrfxaPeQlQztx8eGyNYfZILUCieXuTWLoMx/LKuA0MR27LEx7VtUAAKhE6SgzuJhKp3odEzkg2uRnJ9puZljAt9pk=----ATTACHMENT:----NDc3NzA1NzE5NjA2NjMwOSA0MDEyNTI4MjU3ODczNTQ0IDk5NTg5MTgxNDQ5MTU0NDE=