Added getters

This commit is contained in:
William DURAND 2011-03-25 16:24:34 +01:00
parent d7789af52e
commit 4d98e5101f
4 changed files with 7 additions and 4 deletions

View file

@ -24,6 +24,7 @@ use Symfony\Component\Console\Output\Output;
* BuildCommand.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author William DURAND <william.durand1@gmail.com>
*/
class BuildCommand extends PhingCommand
{
@ -54,14 +55,14 @@ class BuildCommand extends PhingCommand
if (!$input->getOption('sql')) {
$output->writeln('<info>Building model classes</info>');
$modelCommand = new BuildModelCommand();
$modelCommand->setApplication($this->application);
$modelCommand->setApplication($this->getApplication());
$modelCommand->execute($input, $output);
}
if (!$input->getOption('classes')) {
$output->writeln('<info>Building model sql</info>');
$sqlCommand = new BuildSQLCommand();
$sqlCommand->setApplication($this->application);
$sqlCommand->setApplication($this->getApplication());
$sqlCommand->execute($input, $output);
}
}

View file

@ -19,6 +19,7 @@ use Symfony\Component\Console\Output\OutputInterface;
* BuildCommand.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author William DURAND <william.durand1@gmail.com>
*/
class BuildModelCommand extends PhingCommand
{

View file

@ -23,6 +23,7 @@ use Symfony\Bundle\FrameworkBundle\Util\Filesystem;
* BuildCommand.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author William DURAND <william.durand1@gmail.com>
*/
class BuildSqlCommand extends PhingCommand
{
@ -52,7 +53,7 @@ EOT
{
$this->callPhing('sql', array('propel.packageObjectModel' => false));
$filesystem = new Filesystem();
$basePath = $this->application->getKernel()->getRootDir(). DIRECTORY_SEPARATOR . 'propel'. DIRECTORY_SEPARATOR . 'sql';
$basePath = $this->getApplication()->getKernel()->getRootDir(). DIRECTORY_SEPARATOR . 'propel'. DIRECTORY_SEPARATOR . 'sql';
$sqlMap = file_get_contents($basePath . DIRECTORY_SEPARATOR . 'sqldb.map');
foreach ($this->tempSchemas as $schemaFile => $schemaDetails) {
$sqlFile = str_replace('.xml', '.sql', $schemaFile);

View file

@ -24,7 +24,7 @@ use Symfony\Component\Finder\Finder;
* Wrapper command for Phing tasks
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author William DURAND <william.durand1@gmail.com>
* @author William DURAND <william.durand1@gmail.com>
*/
abstract class PhingCommand extends Command
{