Pantheon\Terminus\Config::get PHP Method

get() public method

public get ( $key, $defaultOverride = null )
    public function get($key, $defaultOverride = null)
    {
        if (!$this->configured) {
            $this->configure();
            $this->configured = true;
        }
        if (!isset($this->config[$key])) {
            throw new TerminusException('No configuration setting for {key} found.', compact('key'));
        }
        return parent::get($key);
    }

Usage Example

Example #1
0
 public function testGetPhpAndOSInfo()
 {
     $this->assertEquals(PHP_VERSION, $this->config->get('php_version'));
     $this->assertEquals(get_cfg_var('cfg_file_path'), $this->config->get('php_ini'));
     $this->assertEquals(PHP_BINARY, $this->config->get('php'));
     $this->assertEquals(php_uname('v'), $this->config->get('os_version'));
 }
All Usage Examples Of Pantheon\Terminus\Config::get