Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (34 sloc) 1.48 KB
namespace Doctrine\Bundle\OXMBundle\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Doctrine\OXM\Tools\Console\Command\ClearCache\MetadataCommand;
* Command to clear the metadata cache of the various cache drivers.
* @author Igor Golovanov <>
class ClearMetadataCacheDoctrineOXMCommand extends MetadataCommand
protected function configure()
->setDescription('Clear all metadata cache for a xml-entity manager.')
->addOption('xem', null, InputOption::VALUE_OPTIONAL, 'The xml-entity manager to use for this command.')
The <info>doctrine:oxm:cache:clear-metadata</info> command clears all metadata cache for the default xml-entity manager:
<info>./app/console doctrine:oxm:cache:clear-metadata</info>
You can also optionally specify the <comment>--xem</comment> option to specify which xml-entity manager to clear the cache for:
<info>./app/console doctrine:oxm:cache:clear-metadata --xem=default</info>
protected function execute(InputInterface $input, OutputInterface $output)
DoctrineOXMCommand::setApplicationXmlEntityManager($this->getApplication(), $input->getOption('xem'));
return parent::execute($input, $output);
Jump to Line
Something went wrong with that request. Please try again.