@@ 30-58 (lines=29) @@ | ||
27 | * @author Jonathan H. Wage <[email protected]> |
|
28 | * @author Henrik Westphal <[email protected]> |
|
29 | */ |
|
30 | class ClearMetadataCacheDoctrineODMCommand extends MetadataCommand |
|
31 | { |
|
32 | protected function configure() |
|
33 | { |
|
34 | parent::configure(); |
|
35 | ||
36 | $this |
|
37 | ->setName('doctrine:mongodb:cache:clear-metadata') |
|
38 | ->setDescription('Clear all metadata cache for a document manager.') |
|
39 | ->addOption('dm', null, InputOption::VALUE_OPTIONAL, 'The document manager to use for this command.') |
|
40 | ->setHelp(<<<EOT |
|
41 | The <info>doctrine:mongodb:cache:clear-metadata</info> command clears all metadata cache for the default document manager: |
|
42 | ||
43 | <info>./app/console doctrine:mongodb:cache:clear-metadata</info> |
|
44 | ||
45 | You can also optionally specify the <comment>--dm</comment> option to specify which document manager to clear the cache for: |
|
46 | ||
47 | <info>./app/console doctrine:mongodb:cache:clear-metadata --dm=default</info> |
|
48 | EOT |
|
49 | ); |
|
50 | } |
|
51 | ||
52 | protected function execute(InputInterface $input, OutputInterface $output) |
|
53 | { |
|
54 | DoctrineCommandHelper::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm')); |
|
55 | ||
56 | return parent::execute($input, $output); |
|
57 | } |
|
58 | } |
|
59 |
@@ 28-55 (lines=28) @@ | ||
25 | * @author Fabien Potencier <[email protected]> |
|
26 | * @author Jonathan H. Wage <[email protected]> |
|
27 | */ |
|
28 | class GenerateHydratorsDoctrineODMCommand extends GenerateHydratorsCommand |
|
29 | { |
|
30 | protected function configure() |
|
31 | { |
|
32 | parent::configure(); |
|
33 | ||
34 | $this |
|
35 | ->setName('doctrine:mongodb:generate:hydrators') |
|
36 | ->addOption('dm', null, InputOption::VALUE_OPTIONAL, 'The document manager to use for this command.') |
|
37 | ->setHelp(<<<EOT |
|
38 | The <info>doctrine:mongodb:generate:hydrators</info> command generates hydrator classes for your documents: |
|
39 | ||
40 | <info>./app/console doctrine:mongodb:generate:hydrators</info> |
|
41 | ||
42 | You can specify the document manager you want to generate the hydrators for: |
|
43 | ||
44 | <info>./app/console doctrine:mongodb:generate:hydrators --dm=name</info> |
|
45 | EOT |
|
46 | ); |
|
47 | } |
|
48 | ||
49 | protected function execute(InputInterface $input, OutputInterface $output) |
|
50 | { |
|
51 | DoctrineCommandHelper::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm')); |
|
52 | ||
53 | return parent::execute($input, $output); |
|
54 | } |
|
55 | } |
|
56 |
@@ 28-55 (lines=28) @@ | ||
25 | * @author Fabien Potencier <[email protected]> |
|
26 | * @author Jonathan H. Wage <[email protected]> |
|
27 | */ |
|
28 | class GenerateProxiesDoctrineODMCommand extends GenerateProxiesCommand |
|
29 | { |
|
30 | protected function configure() |
|
31 | { |
|
32 | parent::configure(); |
|
33 | ||
34 | $this |
|
35 | ->setName('doctrine:mongodb:generate:proxies') |
|
36 | ->addOption('dm', null, InputOption::VALUE_OPTIONAL, 'The document manager to use for this command.') |
|
37 | ->setHelp(<<<EOT |
|
38 | The <info>doctrine:mongodb:generate:proxies</info> command generates proxy classes for your default document manager: |
|
39 | ||
40 | <info>./app/console doctrine:mongodb:generate:proxies</info> |
|
41 | ||
42 | You can specify the document manager you want to generate the proxies for: |
|
43 | ||
44 | <info>./app/console doctrine:mongodb:generate:proxies --dm=name</info> |
|
45 | EOT |
|
46 | ); |
|
47 | } |
|
48 | ||
49 | protected function execute(InputInterface $input, OutputInterface $output) |
|
50 | { |
|
51 | DoctrineCommandHelper::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm')); |
|
52 | ||
53 | return parent::execute($input, $output); |
|
54 | } |
|
55 | } |
|
56 |