1
0
mirror of synced 2025-02-21 14:43:14 +03:00

Merge pull request #262 from wrightlabs/patch-1

added optional Command array as parameter for run method
This commit is contained in:
Benjamin Eberlei 2012-01-28 13:12:50 -08:00
commit 120bad8a2c

View File

@ -28,14 +28,16 @@ class ConsoleRunner
* Run console with the given helperset. * Run console with the given helperset.
* *
* @param \Symfony\Component\Console\Helper\HelperSet $helperSet * @param \Symfony\Component\Console\Helper\HelperSet $helperSet
* @param \Symfony\Component\Console\Command\Command[] $commands
* @return void * @return void
*/ */
static public function run(HelperSet $helperSet) static public function run(HelperSet $helperSet, $commands = array())
{ {
$cli = new Application('Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION); $cli = new Application('Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION);
$cli->setCatchExceptions(true); $cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet); $cli->setHelperSet($helperSet);
self::addCommands($cli); self::addCommands($cli);
$cli->addCommands($commands);
$cli->run(); $cli->run();
} }