예제 #1
0
 /**
  * @param EntityManager $entityManager
  * @param string        $runtime
  */
 public function __construct(EntityManager $entityManager, $runtime)
 {
     parent::__construct();
     $this->entityManager = $entityManager;
     $this->runtime = $runtime;
     $this->commandName = $this->getName();
 }
예제 #2
0
 /**
  * Tests whether the getService method correctly retrieves an element from
  * the container.
  */
 public function testGetService()
 {
     $app = new \Cilex\Application('Test');
     $app->command($this->fixture);
     $this->assertInstanceOf('\\Symfony\\Component\\Console\\Application', $this->fixture->getService('console'));
 }
예제 #3
0
 /**
  * Adds a command object.
  *
  * If a command with the same name already exists, it will be overridden.
  *
  * @param \Cilex\Command\Command $command A Command object
  *
  * @api
  *
  * @return void
  */
 public function command(Command\Command $command)
 {
     $command->setContainer($this);
     $this['console']->add($command);
 }
예제 #4
0
 /**
  * Tests whether the getService method correctly retrieves an element from
  * the container.
  */
 public function testGetService()
 {
     $app = new \Cilex\Application('Test');
     $this->fixture->setContainer($app);
     $this->assertInstanceOf('\\Symfony\\Component\\Console\\Application', $app['console']);
 }
예제 #5
0
 /**
  * Registers the current command.
  *
  * @param HelperSet $helperSet
  */
 public function setHelperSet(HelperSet $helperSet)
 {
     parent::setHelperSet($helperSet);
     $this->getHelper('phpdocumentor_logger')->addOptions($this);
 }
 /**
  * @param Application $application
  */
 public function __construct(Application $application)
 {
     parent::__construct();
     $this->application = $application;
 }
예제 #7
0
 public function __construct($name)
 {
     $this->path = $name;
     parent::__construct(null);
 }
예제 #8
0
 /**
  * @param OutputInterface $output
  */
 public function __construct(OutputInterface $output)
 {
     parent::__construct();
     $this->output = $output;
 }
예제 #9
0
 /**
  * Initializes this command with its dependencies.
  *
  * @param Factory $factory
  */
 public function __construct(Factory $factory)
 {
     parent::__construct('template:list');
     $this->factory = $factory;
 }