Doctrine\OXM\Tools\Console\Command\GenerateXmlEntitiesCommand::configure PHP Method

configure() protected method

See also: Console\Command\Command
protected configure ( )
    protected function configure()
    {
        $this->setName('oxm:generate:xml-entities')->setDescription('Generate xml-entity classes and method stubs from your mapping information.')->setDefinition(array(new InputOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match xml-entities that should be processed.'), new InputArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your xml-entity classes.'), new InputOption('generate-annotations', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate annotation metadata on xml-entities.', false), new InputOption('generate-methods', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate stub methods on xml-entities.', true), new InputOption('regenerate-xml-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should regenerate xml-entity if it exists.', false), new InputOption('update-xml-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should only update xml-entity if it exists.', true), new InputOption('extend', null, InputOption::VALUE_OPTIONAL, 'Defines a base class to be extended by generated xml-entity classes.'), new InputOption('num-spaces', null, InputOption::VALUE_OPTIONAL, 'Defines the number of indentation spaces', 4)))->setHelp(<<<EOT
Generate xml-entity classes and method stubs from your mapping information.

If you use the <comment>--update-xml-entities</comment> or <comment>--regenerate-xml-entities</comment> flags your exisiting
code gets overwritten. The XmlEntityGenerator will only append new code to your
file and will not delete the old code. However this approach may still be prone
to error and we suggest you use code repositories such as GIT or SVN to make
backups of your code.

It makes sense to generate the xml-entity code if you are using xml-entities as Data
Access Objects only and dont put much additional logic on them. If you are
however putting much more logic on the xml-entities you should refrain from using
the xml-entity-generator and code your xml-entities manually.

<error>Important:</error> Even if you specified Inheritance options in your
XML or YAML Mapping files the generator cannot generate the base and
child classes for you correctly, because it doesn't know which
class is supposed to extend which. You have to adjust the xml-entity
code manually for inheritance to work!
EOT
);
    }
GenerateXmlEntitiesCommand