Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand::configure PHP Method

configure() protected method

See also: Console\Command\Command
protected configure ( )
    protected function configure()
    {
        $this
        ->setName('orm:convert-mapping')
        ->setDescription('Convert mapping information between supported formats.')
        ->setDefinition(array(
            new InputOption(
                'filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
                'A string pattern used to match entities that should be processed.'
            ),
            new InputArgument(
                'to-type', InputArgument::REQUIRED, 'The mapping type to be converted.'
            ),
            new InputArgument(
                'dest-path', InputArgument::REQUIRED,
                'The path to generate your entities classes.'
            ),
            new InputOption(
                'from-database', null, null, 'Whether or not to convert mapping information from existing database.'
            ),
            new InputOption(
                'extend', null, InputOption::VALUE_OPTIONAL,
                'Defines a base class to be extended by generated entity classes.'
            ),
            new InputOption(
                'num-spaces', null, InputOption::VALUE_OPTIONAL,
                'Defines the number of indentation spaces', 4
            )
        ))
        ->setHelp(<<<EOT
Convert mapping information between supported formats.
EOT
        );
    }

Usage Example

    protected function configure()
    {
        parent::configure();
        $this->setName('doctrine:mapping:convert')->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command.')->setHelp(<<<EOT
The <info>doctrine:mapping:convert</info> command converts mapping information between supported formats:

  <info>./app/console doctrine:mapping:convert xml /path/to/output</info>
EOT
);
    }
All Usage Examples Of Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand::configure
ConvertMappingCommand