本文整理汇总了PHP中Doctrine_Core::generateYamlFromModels方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Core::generateYamlFromModels方法的具体用法?PHP Doctrine_Core::generateYamlFromModels怎么用?PHP Doctrine_Core::generateYamlFromModels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_Core
的用法示例。
在下文中一共展示了Doctrine_Core::generateYamlFromModels方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
Doctrine_Core::generateYamlFromModels($this->getArgument('yaml_schema_path'), $this->getArgument('models_path'));
$this->notify('Generated YAML schema successfully from models');
}
示例2: action_admin_models2yaml
/**
* model2yaml
*
* This generates YAML schema files from MODELS
* This generates TABLES from MODELS.
*
* @see Doctrine_Core::generateSqlFromYaml()
*/
public function action_admin_models2yaml()
{
// load sfYAML (it's somehow not loaded by doctrine autoload)
include ROOT_LIBRARIES . 'doctrine/Doctrine/Parser/sfYaml/SfYaml.php';
#Doctrine_Core::dropDatabases();
#Doctrine_Core::createDatabases();
Doctrine_Core::generateYamlFromModels(DOCTRINE_YAML_SCHEMA_PATH . DIRECTORY_SEPARATOR . 'schema.yml', DOCTRINE_MODELS_PATH);
#Doctrine_Core::createTablesFromModels( DOCTRINE_MODELS_PATH );
$message = '<b>The YAML schema file has been successfully generated from MODELS.</b>';
$message .= '<br /><br />Destination File: ' . DOCTRINE_YAML_SCHEMA_PATH . 'schema.yml';
#$message .= '<br /><br />The DATABASE TABLES have been successfully generated from MODELS.';
$this->setFlashmessage('success', $message);
$this->redirectToReferer();
}
示例3: generateYamlFromModels
private function generateYamlFromModels()
{
$file_path = $this->getOptionsValue('yaml-schema-path');
$file_path .= '/' . $this->getArgumentsValue('output-name');
\Doctrine_Core::generateYamlFromModels($file_path, $this->getOptionsValue('models-path'));
}
示例4: doctrine_create_yaml
/**
* Generate YAML Schema file from Models
* @param string $name
*/
function doctrine_create_yaml($name)
{
Doctrine_Core::generateYamlFromModels(SCHEMA_DIRECTORY . $name . '.yml', MODELS_DIRECTORY);
}
示例5: generateYamlFromModels
public function generateYamlFromModels()
{
$doctrine = $this->_getDoctrineRegistry();
$this->_loadDoctrineModels();
$yamlDir = $this->_getYamlDirectoryPath();
Doctrine_Core::generateYamlFromModels($yamlDir, null);
$this->_print('Successfully generated yaml schema files from model.', array('color' => 'green'));
$this->_print('Destination Directory: ' . $yamlDir);
}
示例6: generateSchema
public function generateSchema()
{
Doctrine_Core::generateYamlFromModels(MODELS . '/schema/generated.yml', MODELS);
FlashComponent::set('info', 'Generate Schema terminé.');
$this->redirect(array('action' => 'index'));
}