本文整理汇总了PHP中Doctrine_Core::dumpData方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Core::dumpData方法的具体用法?PHP Doctrine_Core::dumpData怎么用?PHP Doctrine_Core::dumpData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_Core
的用法示例。
在下文中一共展示了Doctrine_Core::dumpData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doctrine_extract_database_data
/**
* Populate database with YAML fixtures
* @param string $name
*/
function doctrine_extract_database_data($name = NULL, $individual = FALSE)
{
if ($individual === TRUE) {
$location = FIXTURES_DIRECTORY;
} else {
$location = FIXTURES_DIRECTORY . $name . '.yml';
}
Doctrine_Core::dumpData($location, $individual);
}
示例2: execute
public function execute()
{
$models = Doctrine_Core::loadModels($this->getArgument('models_path'));
if (empty($models)) {
throw new Doctrine_Task_Exception('No models were loaded');
}
$path = $this->getArgument('data_fixtures_path');
if (is_array($path) && count($path) > 0) {
$path = $path[0];
}
if (!empty($path)) {
Doctrine_Core::dumpData($path);
$this->notify(sprintf('Dumped data successfully to: %s', $path));
} else {
throw new Doctrine_Task_Exception('Unable to find data fixtures path.');
}
}
示例3: dumpData
public function dumpData($individualFiles = false)
{
$this->_loadDoctrineModels();
$fixtureDir = $this->_getDataFixtureDirectoryPath();
Doctrine_Core::dumpData($fixtureDir, $individualFiles);
$this->_print('Successfully dumped current database contents into fixture directory.', array('color' => 'green'));
$this->_print('Destination Directory: ' . $fixtureDir);
}