1
0
mirror of synced 2025-01-18 14:31:40 +03:00

Made orm:convert-mapping command more configurable (allow to change the extension of the generated files for instance)

This commit is contained in:
Fabien Potencier 2011-06-05 08:03:41 +02:00 committed by Benjamin Eberlei
parent 875f5c1fa8
commit 86c3744b8c

View File

@ -137,8 +137,7 @@ EOT
$toType = strtolower($input->getArgument('to-type'));
$cme = new ClassMetadataExporter();
$exporter = $cme->getExporter($toType, $destPath);
$exporter = $this->getExporter($toType, $destPath);
$exporter->setOverwriteExistingFiles( ($input->getOption('force') !== false) );
if ($toType == 'annotation') {
@ -167,4 +166,11 @@ EOT
$output->write('No Metadata Classes to process.' . PHP_EOL);
}
}
protected function getExporter($toType, $destPath)
{
$cme = new ClassMetadataExporter();
return $cme->getExporter($toType, $destPath);
}
}