Graby\Graby::getConfig PHP 메소드

getConfig() 공개 메소드

Return a config.
public getConfig ( string $key ) : mixed
$key string
리턴 mixed
    public function getConfig($key)
    {
        if (!isset($this->config[$key])) {
            throw new \Exception(sprintf('No config found for key: "%s"', $key));
        }
        return $this->config[$key];
    }

Usage Example

예제 #1
0
파일: GrabyTest.php 프로젝트: harikt/graby
 /**
  * @dataProvider dataForConfigOverride
  */
 public function testConfigOverride($key, $config)
 {
     $graby = new Graby($config);
     $this->assertEquals($config[$key], $graby->getConfig($key));
 }