Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand::execute PHP Method

execute() public method

public 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
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $configuration = $this->getMigrationConfiguration($input, $output);
        $version = $configuration->generateVersionNumber();
        $path = $this->generateMigration($configuration, $input, $version);
        $output->writeln(sprintf('Generated new migration class to "<info>%s</info>"', $path));
    }

Usage Example

 public function execute(InputInterface $input, OutputInterface $output)
 {
     DoctrineCommand::setApplicationEntityManager($this->application, $input->getOption('em'));
     $configuration = $this->getMigrationConfiguration($input, $output);
     DoctrineCommand::configureMigrations($this->application->getKernel()->getContainer(), $configuration);
     parent::execute($input, $output);
 }
All Usage Examples Of Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand::execute