Skip to content

Commit

Permalink
Merge pull request #66 from fabpot/feat-doctrine-mapping-configuration
Browse files Browse the repository at this point in the history
Feat doctrine mapping configuration
  • Loading branch information
beberlei committed Jun 5, 2011
2 parents 178fe38 + 636fa34 commit be03811
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php
Expand Up @@ -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') {
Expand Down Expand Up @@ -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 be03811

Please sign in to comment.