PHP Class Doctrine\DBAL\Migrations\Tools\Console\Command\AbstractCommand

Since: 2.0
Author: Jonathan Wage ([email protected])
Inheritance: extends Symfony\Components\Console\Command\Command
Exibir arquivo Open project: doctrine/migrations Class Usage Examples

Public Methods

Method Description
setMigrationConfiguration ( Configuration $config )

Protected Methods

Method Description
askConfirmation ( $question, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed This method ensure that we stay compatible with symfony console 2.3 by using the deprecated dialog helper but use the ConfirmationQuestion when available.
configure ( )
getMigrationConfiguration ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Configuration When any (config) command line option is passed to the migration the migrationConfiguration property is set with the new generated configuration.
outputHeader ( Configuration $configuration, Symfony\Component\Console\Output\OutputInterface $output )

Private Methods

Method Description
getConnection ( Symfony\Component\Console\Input\InputInterface $input ) : Doctrine\DBAL\Connection
getOutputWriter ( Symfony\Component\Console\Output\OutputInterface $output ) : Doctrine\DBAL\Migrations\OutputWriter

Method Details

askConfirmation() protected method

This method ensure that we stay compatible with symfony console 2.3 by using the deprecated dialog helper but use the ConfirmationQuestion when available.
protected askConfirmation ( $question, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed
$question
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return mixed

configure() protected method

protected configure ( )

getMigrationConfiguration() protected method

If no (config) option is passed the migrationConfiguration property is set to the value of the configuration one (if any). Else a new configuration is created and assigned to the migrationConfiguration property.
protected getMigrationConfiguration ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Configuration
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return Doctrine\DBAL\Migrations\Configuration\Configuration

outputHeader() protected method

protected outputHeader ( Configuration $configuration, Symfony\Component\Console\Output\OutputInterface $output )
$configuration Doctrine\DBAL\Migrations\Configuration\Configuration
$output Symfony\Component\Console\Output\OutputInterface

setMigrationConfiguration() public method

public setMigrationConfiguration ( Configuration $config )
$config Doctrine\DBAL\Migrations\Configuration\Configuration