diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index 8c1a8fea1..1522277fc 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -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); + } }