Symfony\Component\Console\Command\Command::initialize PHP Method

initialize() protected method

This is mainly useful when a lot of commands extends one main command where some things need to be initialized based on the input arguments and options.
protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
    }

Usage Example

Beispiel #1
0
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     parent::initialize($input, $output);
     $this->io = new SymfonyStyle($input, $output);
     $debug = $output->getVerbosity() === OutputInterface::VERBOSITY_DEBUG;
     $this->cff = new CffClient($debug);
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::initialize