1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Clarify how the CLI is setup

This commit is contained in:
Benjamin Eberlei 2011-12-17 23:56:10 +01:00
parent 48acbf75cd
commit e42d70a2b0

View File

@ -34,6 +34,24 @@ about the use of generate entities for example, you can call:
doctrine orm:generate-entities --help
Setting up the Console
----------------------
Doctrine uses the Symfony Console component for generating the command
line interface. You can take a look at the ``bin/doctrine.php``
script and the ``Doctrine\ORM\Tools\Console\ConsoleRunner`` command
for inspiration how to setup the cli.
In general the required code looks like this:
.. code-block:: php
$cli = new Application('Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION);
$cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
Doctrine\ORM\Tools\Console\ConsoleRunner::addCommands($cli);
$cli->run();
Configuration
~~~~~~~~~~~~~