protected function generateYaml($schemaPath, $directory = null, $models = array(), $modelLoading = null)
 {
     $currentProjectModels = (array) sfYaml::load($schemaPath);
     $export = new Doctrine_Export_Schema();
     $newProjectModels = $export->buildSchema($directory, $models, $modelLoading);
     $projectModels = array_merge($currentProjectModels, $newProjectModels);
     if (is_dir($schemaPath)) {
         $schemaPath = $schemaPath . DIRECTORY_SEPARATOR . 'schema.yml';
     }
     return Doctrine_Parser::dump($projectModels, 'yml', $schemaPath);
 }