Ejemplo n.º 1
0
 /**
  * Generate yaml schema file for the models in the specified directory
  *
  * @param string $yamlPath Path to your yaml schema files
  * @param string $directory Directory to generate your models in
  * @return void
  */
 public static function generateYamlFromModels($yamlPath, $directory)
 {
     $export = new Doctrine_Export_Schema();
     return $export->exportSchema($yamlPath, 'yml', $directory);
 }
Ejemplo n.º 2
0
 public function testYmlExport()
 {
     $export = new Doctrine_Export_Schema();
     $export->exportSchema('schema-export.yml', 'yml', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'models', $this->tables);
     unlink('schema-export.yml');
 }