ヤミRoot VoidGate
User / IP
:
216.73.216.33
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
friendsofsymfony
/
rest-bundle
/
Routing
/
Loader
/
Viewing: DirectoryRouteLoader.php
<?php /* * This file is part of the FOSRestBundle package. * * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace FOS\RestBundle\Routing\Loader; use Symfony\Component\Config\FileLocatorInterface; use Symfony\Component\Config\Loader\Loader; use Symfony\Component\Finder\Finder; use Symfony\Component\Routing\RouteCollection; /** * Parse annotated controller classes from all files of a directory. * * @author Christian Flothmann <christian.flothmann@xabbuh.de> */ class DirectoryRouteLoader extends Loader { private $fileLocator; private $processor; public function __construct(FileLocatorInterface $fileLocator, RestRouteProcessor $processor) { $this->fileLocator = $fileLocator; $this->processor = $processor; } /** * {@inheritdoc} */ public function load($resource, $type = null) { if (isset($resource[0]) && in_array($resource[0], ['@', '.'], true)) { $resource = $this->fileLocator->locate($resource); } if (!is_dir($resource)) { throw new \InvalidArgumentException(sprintf('Given resource of type "%s" is no directory.', $resource)); } $collection = new RouteCollection(); $finder = new Finder(); foreach ($finder->in($resource)->name('*.php')->files() as $file) { if ($class = ClassUtils::findClassInFile($file)) { $imported = $this->processor->importResource($this, $class, array(), null, null, 'rest'); $collection->addCollection($imported); } } return $collection; } /** * {@inheritdoc} */ public function supports($resource, $type = null) { if ('rest' !== $type || !is_string($resource)) { return false; } if (isset($resource[0]) && in_array($resource[0], ['@', '.'], true)) { $resource = $this->fileLocator->locate($resource); } return is_dir($resource); } }
Coded With 💗 by
0x6ick