FOF30\Configuration\Domain\Views::get PHP Method

get() public method

Return a configuration variable
public get ( &$configuration, string $var, mixed $default ) : mixed
$var string The variable we want to fetch
$default mixed Default value
return mixed The variable's value
    public function get(&$configuration, $var, $default)
    {
        $parts = explode('.', $var);
        $view = $parts[0];
        $method = 'get' . ucfirst($parts[1]);
        if (!method_exists($this, $method)) {
            return $default;
        }
        array_shift($parts);
        array_shift($parts);
        $ret = $this->{$method}($view, $configuration, $parts, $default);
        return $ret;
    }