本文整理汇总了PHP中Doctrine_Core::generateYamlFromDb方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Core::generateYamlFromDb方法的具体用法?PHP Doctrine_Core::generateYamlFromDb怎么用?PHP Doctrine_Core::generateYamlFromDb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_Core
的用法示例。
在下文中一共展示了Doctrine_Core::generateYamlFromDb方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateYamlFromDb
private function generateYamlFromDb()
{
$con_name = $this->getArgumentsvalue('connection-name');
if ($con_name === '{default}') {
$con_name = $this->Con->getName();
}
$file_path = $this->getOptionsValue('yaml-schema-path');
$file_path .= '/' . $this->getArgumentsValue('output-name');
\Doctrine_Core::generateYamlFromDb($file_path, array($con_name), $this->getImportOptions());
}
示例2: execute
public function execute()
{
Doctrine_Core::generateYamlFromDb($this->getArgument('yaml_schema_path'));
$this->notify('Generate YAML schema successfully from database');
}
示例3: action_admin_db2yaml
/**
* db2yaml
*
* This generates YAML schema files from Database.
*/
public function action_admin_db2yaml()
{
// load sfYAML (it's somehow not loaded by doctrine autoload)
include ROOT_LIBRARIES . 'doctrine/Doctrine/Parser/sfYaml/SfYaml.php';
Doctrine_Core::generateYamlFromDb(DOCTRINE_YAML_SCHEMA_PATH . 'schema.yml', array(), self::$options);
$message = '<b>The YAML schema file has been successfully generated from DATABASE.</b>';
$message .= '<br /><br />Destination File: ' . DOCTRINE_YAML_SCHEMA_PATH . 'schema.yml';
$this->setFlashmessage('success', $message);
$this->redirectToReferer();
}
示例4: generateYamlFromDatabase
public function generateYamlFromDatabase()
{
$this->_initDoctrineResource();
$yamlDir = $this->_getYamlDirectoryPath();
Doctrine_Core::generateYamlFromDb($yamlDir);
$this->_print('Succsesfully generated yaml schema files from database.', array('color' => 'green'));
$this->_print('Destination Directory: ' . $yamlDir);
}