Exemple #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();
 }
Exemple #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'));
 }
 /**
  * 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);
 }
 /**
  * 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']);
 }
 /**
  * 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;
 }
 public function __construct($name)
 {
     $this->path = $name;
     parent::__construct(null);
 }
 /**
  * @param OutputInterface $output
  */
 public function __construct(OutputInterface $output)
 {
     parent::__construct();
     $this->output = $output;
 }
 /**
  * Initializes this command with its dependencies.
  *
  * @param Factory $factory
  */
 public function __construct(Factory $factory)
 {
     parent::__construct('template:list');
     $this->factory = $factory;
 }