Frisbee\Application::getConfig PHP Метод

getConfig() публичный Метод

public getConfig ( $key = null )
    public function getConfig($key = null)
    {
        if (is_null($key) || empty($this->config)) {
            return $this->config;
        }
        if (!array_key_exists($key, $this->config)) {
            // Todo: implement boomerang here
        }
        return $this->config[$key];
    }

Usage Example

Пример #1
0
 protected function getRoute()
 {
     $routeConfig = $this->application->getConfig('routes');
     $context = new RequestContext('/');
     $matcher = new UrlMatcher($routeConfig, $context);
     return $matcher->match($_SERVER['REQUEST_URI']);
 }