InfoDoctrineCommand.php 918 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy;
  3. use Doctrine\ORM\Tools\Console\Command\InfoCommand;
  4. use Symfony\Component\Console\Input\InputInterface;
  5. use Symfony\Component\Console\Input\InputOption;
  6. use Symfony\Component\Console\Output\OutputInterface;
  7. /**
  8. * Show information about mapped entities
  9. */
  10. class InfoDoctrineCommand extends InfoCommand
  11. {
  12. /**
  13. * {@inheritDoc}
  14. */
  15. protected function configure()
  16. {
  17. $this
  18. ->setName('doctrine:mapping:info')
  19. ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
  20. }
  21. /**
  22. * {@inheritDoc}
  23. */
  24. protected function execute(InputInterface $input, OutputInterface $output)
  25. {
  26. DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
  27. return parent::execute($input, $output);
  28. }
  29. }