public function initialize(InputInterface $input, OutputInterface $output) { parent::initialize($input, $output); $this->searchIndexer = $this->getContainer()->get('ezpublish.spi.search.indexer'); if (!$this->searchIndexer instanceof Indexer) { throw new RuntimeException(sprintf('Expected to find Search Engine Indexer but found "%s" instead', get_parent_class($this->searchIndexer))); } }