Liip\RMT\Information\InformationCollector::getValueFor PHP 메소드

getValueFor() 공개 메소드

public getValueFor ( $requestName, $default = null )
    public function getValueFor($requestName, $default = null)
    {
        if ($this->hasRequest($requestName)) {
            return $this->getRequest($requestName)->getValue();
        } else {
            if (func_num_args() == 2) {
                return $default;
            }
            throw new \Exception("No request named {$requestName}");
        }
    }

Usage Example

예제 #1
0
 /**
  * Returns initial config data.
  * 
  * @return array
  */
 public function getConfigData()
 {
     $config = array();
     $vcs = $this->informationCollector->getValueFor('vcs');
     if ($vcs !== 'none') {
         $config['vcs'] = $vcs;
     }
     $config['versionPersister'] = $this->informationCollector->getValueFor('persister');
     return $config;
 }
All Usage Examples Of Liip\RMT\Information\InformationCollector::getValueFor