1
0
mirror of synced 2025-01-29 19:41:45 +03:00

added optional command array as parameter for run method

This commit is contained in:
John Wright 2012-01-16 21:01:44 -08:00
parent c1012f7970
commit 543c73bc05

View File

@ -28,14 +28,16 @@ class ConsoleRunner
* Run console with the given helperset.
*
* @param \Symfony\Component\Console\Helper\HelperSet $helperSet
* @param \Symfony\Component\Console\Command\Command[] $commands
* @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->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
self::addCommands($cli);
$cli->addCommands($commands);
$cli->run();
}