Changeset 7669
- Timestamp:
- 02/28/08 13:39:12 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/plugins/sfPropelPlugin/lib/task/sfPropelBuildAllLoadTask.class.php
r7400 r7669 30 30 )); 31 31 32 $this->addOptions(array( 33 new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'), 34 new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'propel'), 35 )); 36 32 37 $this->aliases = array('propel-build-all-load'); 33 38 $this->namespace = 'propel'; … … 55 60 protected function execute($arguments = array(), $options = array()) 56 61 { 62 // load Propel configuration before Phing 63 $configuration = sfApplicationConfiguration::getForApplication($arguments['application'], $options['env'], true); 64 $databaseManager = new sfDatabaseManager($configuration); 65 require_once sfConfig::get('sf_symfony_lib_dir').'/plugins/sfPropelPlugin/lib/propel/sfPropelAutoload.php'; 66 57 67 $buildAll = new sfPropelBuildAllTask($this->dispatcher, $this->formatter); 58 68 $buildAll->setCommandApplication($this->commandApplication); … … 61 71 $loadData = new sfPropelLoadDataTask($this->dispatcher, $this->formatter); 62 72 $loadData->setCommandApplication($this->commandApplication); 63 $loadData->run(array('application' => $arguments['application'])); 73 74 $loadData->run(array('application' => $arguments['application']), array('--env='.$options['env'], '--connection='.$options['connection'])); 64 75 } 65 76 }