vendor/doctrine/phpcr-bundle/src/Command/WorkspaceCreateCommand.php line 13

Open in your IDE?
  1. <?php
  2. namespace Doctrine\Bundle\PHPCRBundle\Command;
  3. use PHPCR\Util\Console\Command\WorkspaceCreateCommand as BaseWorkspaceCreateCommand;
  4. use Symfony\Component\Console\Input\InputInterface;
  5. use Symfony\Component\Console\Input\InputOption;
  6. use Symfony\Component\Console\Output\OutputInterface;
  7. /**
  8.  * Wrapper to use this command in the symfony console with multiple sessions.
  9.  */
  10. class WorkspaceCreateCommand extends BaseWorkspaceCreateCommand
  11. {
  12.     /**
  13.      * @return void
  14.      */
  15.     protected function configure()
  16.     {
  17.         parent::configure();
  18.         $this
  19.             ->setName('doctrine:phpcr:workspace:create')
  20.             ->addOption('session'nullInputOption::VALUE_REQUIRED'The session to use for this command')
  21.         ;
  22.     }
  23.     /**
  24.      * @return int
  25.      */
  26.     protected function execute(InputInterface $inputOutputInterface $output)
  27.     {
  28.         DoctrineCommandHelper::setApplicationPHPCRSession(
  29.             $this->getApplication(),
  30.             $input->getOption('session'),
  31.             true
  32.         );
  33.         return parent::execute($input$output);
  34.     }
  35. }