vendor/doctrine/doctrine-bundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php line 13

Open in your IDE?
  1. <?php
  2. namespace Doctrine\Bundle\DoctrineBundle\Command\Proxy;
  3. use Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand;
  4. use Symfony\Component\Console\Input\InputInterface;
  5. use Symfony\Component\Console\Input\InputOption;
  6. use Symfony\Component\Console\Output\OutputInterface;
  7. /**
  8.  * Command to clear the query cache of the various cache drivers.
  9.  */
  10. class ClearQueryCacheDoctrineCommand extends QueryCommand
  11. {
  12.     /**
  13.      * {@inheritDoc}
  14.      */
  15.     protected function configure()
  16.     {
  17.         parent::configure();
  18.         $this
  19.             ->setName('doctrine:cache:clear-query')
  20.             ->setDescription('Clears all query cache for an entity manager');
  21.         if ($this->getDefinition()->hasOption('em')) {
  22.             return;
  23.         }
  24.         $this->addOption('em'nullInputOption::VALUE_OPTIONAL'The entity manager to use for this command');
  25.     }
  26.     /**
  27.      * {@inheritDoc}
  28.      */
  29.     protected function execute(InputInterface $inputOutputInterface $output)
  30.     {
  31.         DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
  32.         return parent::execute($input$output);
  33.     }
  34. }