Permalink
Browse files

Made orm:convert-mapping command more configurable (allow to change t…

…he extension of the generated files for instance)
  • Loading branch information...
fabpot authored and beberlei committed Jun 5, 2011
1 parent 875f5c1 commit 86c3744b8c2b2a85d7c33000ab200e7d99adb577
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
@@ -137,8 +137,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
$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 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
$output->write('No Metadata Classes to process.' . PHP_EOL);
}
}
+
+ protected function getExporter($toType, $destPath)
+ {
+ $cme = new ClassMetadataExporter();
+
+ return $cme->getExporter($toType, $destPath);
+ }
}

0 comments on commit 86c3744

Please sign in to comment.