execute() protected method

See also: Command
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $excludeBundles = $input->getOption('exclude');
     if (!empty($excludeBundles)) {
         /** @var ContainerProxy $containerProxy */
         $containerProxy = $this->getContainer();
         $kernelProxy = new KernelProxy($containerProxy->get('kernel'));
         foreach ($excludeBundles as $bundleName) {
             $kernelProxy->excludeBundle($bundleName);
         }
         $containerProxy->replace('kernel', $kernelProxy);
     }
     parent::execute($input, $output);
 }