コード例 #1
0
ファイル: Maintenance.php プロジェクト: pborel/NewsToChat
 /**
  * @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
ファイル: CommandTest.php プロジェクト: corcre/elabftw
 /**
  * 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);
 }
コード例 #6
0
 /**
  * @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;
 }