Author: Fabien Potencier (fabien.potencier@symfony-project.com)
Inheritance: extends Symfony\Component\Console\Shell
示例#1
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 (true === $input->hasParameterOption(array('--shell', '-s'))) {
         $shell = new Shell($this);
         $shell->run();
         return 0;
     }
     return parent::doRun($input, $output);
 }
示例#2
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)
 {
     $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
 /**
  * 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);
 }