src/Doctrine/DI/DoctrineExtension.php
private function processConsole()
	{
		$builder = $this->getContainerBuilder();

		$console = $builder->addDefinition($this->prefix('console'))
			->setClass(Application::class)
			->setArguments(['Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION])
			->addSetup('?->setCatchExceptions(TRUE)', ['@self'])
			->addSetup('$helperSet = ' . ConsoleRunner::class . '::createHelperSet(?)', ['@' . $this->prefix('entityManager')])
			->addSetup('$helperSet->set(new \Andromeda\Doctrine\Console\Helpers\ContainerHelper(?), ?)', ['@Nette\DI\Container', 'container'])
			->addSetup('?->setHelperSet($helperSet)', ['@self'])
			->addSetup(ConsoleRunner::class . '::addCommands(?)', ['@self']);

		$commands = array_merge([
			Commands\SchemaCreateCommand::class,
			Commands\SchemaUpdateCommand::class,
			Commands\SchemaDropCommand::class
		], $this->config['commands']);

		foreach ($commands as $command) {
			$console->addSetup('?->add(?)', ['@self', new Nette\DI\Statement($command)]);
		}
	}
private function processConsole()
	{
		$builder = $this->getContainerBuilder();

		$console = $builder->addDefinition($this->prefix('console'))
			->setClass(Application::class)
			->setArguments(['Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION])
			->addSetup('?->setCatchExceptions(TRUE)', ['@self'])
			->addSetup('$helperSet = ' . ConsoleRunner::class . '::createHelperSet(?)', ['@' . $this->prefix('entityManager')])
			->addSetup('$helperSet->set(new \Andromeda\Doctrine\Console\Helpers\ContainerHelper(?), ?)', ['@Nette\DI\Container', 'container'])
			->addSetup('?->setHelperSet($helperSet)', ['@self'])
			->addSetup(ConsoleRunner::class . '::addCommands(?)', ['@self']);

		$commands = array_merge([
			Commands\SchemaCreateCommand::class,
			Commands\SchemaUpdateCommand::class,
			Commands\SchemaDropCommand::class
		], $this->config['commands']);

		foreach ($commands as $command) {
			$console->addSetup('?->add(?)', ['@self', new Nette\DI\Statement($command)]);
		}
	}
private function processConsole ( ) { $ builder = $ this -> getContainerBuilder ( ) ; $ console = $ builder -> addDefinition ( $ this -> prefix ( 'console' ) ) -> setClass ( Application :: class ) -> setArguments ( [ 'Doctrine Command Line Interface' , \ Doctrine \ ORM \ Version :: VERSION ] ) -> addSetup ( '?->setCatchExceptions(TRUE)' , [ '@self' ] ) -> addSetup ( '$helperSet = ' . ConsoleRunner :: class . '::createHelperSet(?)' , [ '@' . $ this -> prefix ( 'entityManager' ) ] ) -> addSetup ( '$helperSet->set(new \Andromeda\Doctrine\Console\Helpers\ContainerHelper(?), ?)' , [ '@Nette\DI\Container' , 'container' ] ) -> addSetup ( '?->setHelperSet($helperSet)' , [ '@self' ] ) -> addSetup ( ConsoleRunner :: class . '::addCommands(?)' , [ '@self' ] ) ; $ commands = array_merge ( [ Commands \ SchemaCreateCommand :: class , Commands \ SchemaUpdateCommand :: class , Commands \ SchemaDropCommand :: class ] , $ this -> config [ 'commands' ] ) ; foreach ( $ commands as $ command ) { $ console -> addSetup ( '?->add(?)' , [ '@self' , new Nette \ DI \ Statement ( $ command ) ] ) ; } }
Registers Doctrine Console.
Registers Doctrine Console .