本文整理汇总了PHP中Doctrine::dumpData方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine::dumpData方法的具体用法?PHP Doctrine::dumpData怎么用?PHP Doctrine::dumpData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine
的用法示例。
在下文中一共展示了Doctrine::dumpData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dumpData
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: execute
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: execute
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: exportFixtures
/**
* Export fixture files to $path
*
* @param string $path
* @return void
*/
public function exportFixtures($path)
{
$this->_loadDoctrineModels();
Doctrine::dumpData($path, true);
}