FOF30\Configuration\Configuration::get PHP Méthode

get() public méthode

view.config.whatever where the first part is the domain, the rest of the parts specify the path to the variable.
public get ( string $variable, mixed $default = null ) : mixed
$variable string The variable name
$default mixed The default value, or null if not specified
Résultat mixed The value of the variable
    public function get($variable, $default = null)
    {
        static $domains = null;
        if (is_null($domains)) {
            $domains = $this->getDomains();
        }
        list($domain, $var) = explode('.', $variable, 2);
        if (!in_array(ucfirst($domain), $domains)) {
            return $default;
        }
        $class = '\\FOF30\\Configuration\\Domain\\' . ucfirst($domain);
        /** @var   \FOF30\Configuration\Domain\DomainInterface  $o */
        $o = new $class();
        return $o->get(self::$configurations[$this->container->componentName], $var, $default);
    }