/** * 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); }
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'); }