add connection option for commands: build, sql:build, migration:generate-diff

This commit is contained in:
jaugustin 2012-10-23 01:02:00 +02:00
commit a8bb6a2a8b
6 changed files with 42 additions and 16 deletions

View file

@ -13,6 +13,7 @@ namespace Propel\PropelBundle\Command;
use Propel\PropelBundle\Command\AbstractCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
@ -31,6 +32,7 @@ class ModelBuildCommand extends AbstractCommand
$this
->setDescription('Build the Propel Object Model classes based on XML schemas')
->addArgument('bundle', InputArgument::OPTIONAL, 'The bundle to generate model classes from')
->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'Set this parameter to define a connection to use')
->setHelp(<<<EOT
The <info>%command.name%</info> command builds the Propel runtime model classes (ActiveRecord, Query, Peer, and TableMap classes) based on the XML schemas defined in all Bundles.