Fixing issue with .xml being hardcoded and converting yaml to yml for propert file extension.

This commit is contained in:
Jonathan H. Wage 2010-08-04 21:02:09 -05:00 committed by Fabien Potencier
parent 373d05c9ba
commit dbc5249f88

View File

@ -75,6 +75,9 @@ EOT
} else {
$destPath .= '/Resources/config/doctrine/metadata';
}
if ($type === 'yaml') {
$type = 'yml';
}
$cme = new ClassMetadataExporter();
$exporter = $cme->getExporter($type);
@ -100,7 +103,7 @@ EOT
if ($type === 'annotation') {
$path = $destPath.'/'.$className.'.php';
} else {
$path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.xml';
$path = $destPath.'/'.str_replace('\\', '.', $class->name).'.dcm.'.$type;
}
$output->writeln(sprintf(' > writing <comment>%s</comment>', $path));
$code = $exporter->exportClassMetadata($class);