diff --git a/Command/SqlBuildCommand.php b/Command/SqlBuildCommand.php new file mode 100644 index 0000000..d73dad3 --- /dev/null +++ b/Command/SqlBuildCommand.php @@ -0,0 +1,57 @@ + + */ +class SqlBuildCommand extends AbstractCommand +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + parent::configure(); + + $this + ->setName('propel:sql:build') + ->setDescription('Build SQL files') + + ->addOption('connection', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Connection to use. Example: default, bookstore') + // @todo add the other arguments/options handled by the command + ; + } + + /** + * {@inheritdoc} + */ + protected function createSubCommandInstance() + { + return new \Propel\Generator\Command\SqlBuildCommand(); + } + + /** + * {@inheritdoc} + */ + protected function getSubCommandArguments(InputInterface $input) + { + return array( + '--output-dir' => $this->getCacheDir(), + '--connection' => $this->getConnections($input->getOption('connection')), + ); + } +}