Пример #1
0
 public function dumpData()
 {
     Doctrine::dumpData(MODELS . '/fixtures/dev', 1);
     $this->dumpFiles('Picture');
     $this->dumpFiles('File');
     FlashComponent::set('info', 'Dump Data terminé.');
     $this->redirect(array('action' => 'index'));
 }
Пример #2
0
 public function execute()
 {
     Doctrine::loadModels($this->getArgument('models_path'));
     $path = $this->getArgument('data_fixtures_path');
     if (is_array($path)) {
         $path = $path[0];
     }
     Doctrine::dumpData($path);
     $this->dispatcher->notify(sprintf('Dumped data successfully to: %s', $path));
 }
Пример #3
0
 public function execute()
 {
     Doctrine::loadModels($this->getArgument('models_path'));
     $path = $this->getArgument('data_fixtures_path');
     if (is_array($path) && count($path) > 0) {
         $path = $path[0];
         Doctrine::dumpData($path);
         $this->notify(sprintf('Dumped data successfully to: %s', $path));
     } else {
         throw new Doctrine_Task_Exception('Unable to find data fixtures path.');
     }
 }
Пример #4
0
 /**
  * Export fixture files to $path
  * 
  * @param string $path
  * @return void
  */
 public function exportFixtures($path)
 {
     $this->_loadDoctrineModels();
     Doctrine::dumpData($path, true);
 }