Author: Fabien Potencier (fabien.potencier@symfony-project.com)
Inheritance: extends Symfony\Component\Console\Shell
コード例 #1
0
ファイル: Application.php プロジェクト: netixpro/symfony
 /**
  * Runs the current application.
  *
  * @param InputInterface  $input  An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return integer 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     if (true === $input->hasParameterOption(array('--shell', '-s'))) {
         $shell = new Shell($this);
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }
コード例 #2
0
ファイル: Application.php プロジェクト: joan16v/symfony2_test
 /**
  * Runs the current application.
  *
  * @param InputInterface  $input  An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return integer 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->registerCommands();
     if (true === $input->hasParameterOption(array('--shell', '-s'))) {
         $shell = new Shell($this);
         $shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation')));
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }
コード例 #3
0
 /**
  * Runs the current application.
  *
  * @param InputInterface  $input  An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return integer 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     if (!$this->commandsRegistered) {
         $this->registerCommands();
         $this->commandsRegistered = true;
     }
     $this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));
     if (true === $input->hasParameterOption(array('--shell', '-s'))) {
         $shell = new Shell($this);
         $shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation')));
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }
コード例 #4
0
ファイル: Application.php プロジェクト: raphydev/onep
 /**
  * Runs the current application.
  *
  * @param InputInterface  $input  An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return int 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->kernel->boot();
     $container = $this->kernel->getContainer();
     foreach ($this->all() as $command) {
         if ($command instanceof ContainerAwareInterface) {
             $command->setContainer($container);
         }
     }
     $this->setDispatcher($container->get('event_dispatcher'));
     if (true === $input->hasParameterOption(array('--shell', '-s'))) {
         $shell = new Shell($this);
         $shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation')));
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }
コード例 #5
0
 /**
  * Runs the current application.
  *
  * @param InputInterface  $input  An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return int 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->kernel->boot();
     $container = $this->kernel->getContainer();
     foreach ($this->all() as $command) {
         if ($command instanceof ContainerAwareInterface) {
             $command->setContainer($container);
         }
     }
     $this->setDispatcher($container->get('event_dispatcher'));
     if (true === $input->hasParameterOption(array('--shell', '-s'))) {
         @trigger_error('The "--shell" option is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
         $shell = new Shell($this);
         $shell->setProcessIsolation($input->hasParameterOption(array('--process-isolation')));
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }