Liip\RMT\Information\InformationCollector::registerStandardRequest PHP Method

registerStandardRequest() public method

public registerStandardRequest ( $name )
    public function registerStandardRequest($name)
    {
        if (!in_array($name, array_keys(static::$standardRequests))) {
            throw new \Exception("There is no standard request named [{$name}]");
        }
        if (!isset($this->requests[$name])) {
            $this->requests[$name] = new InformationRequest($name, static::$standardRequests[$name]);
        }
    }

Usage Example

Esempio n. 1
0
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     $this->assertTaggingIsDisabled();
     $ic = new InformationCollector();
     $ic->registerStandardRequest('type');
     $this->getContext()->setService('information-collector', $ic);
     $this->getContext()->setService('output', $this->output);
     $this->getContext()->getInformationCollector()->handleCommandInput($input);
     $currentVersion = $this->getContext()->getVersionDetector()->getCurrentVersion();
     $this->getContext()->setParameter('current-version', $currentVersion);
 }
All Usage Examples Of Liip\RMT\Information\InformationCollector::registerStandardRequest