src/Service/Config/Config.php
public function loadConfigValue($name)
    {
        $feConfig = $this->iniConfig->getFeConfig($name);
        $section = $this->feConfigFallback[$name][static::SECTION];
        /** @var Model $model */
        $model = $this->pool->createClass('Brainworxx\\Krexx\\Service\\Config\\Model')
            ->setSection($section)
            ->setEditable($feConfig[0])
            ->setType($feConfig[1]);

        // Do we accept cookie settings here?
        if ($feConfig[0] === true) {
            $cookieSetting = $this->cookieConfig->getConfigFromCookies($section, $name);
            // Do we have a value in the cookies?
            if ($cookieSetting  !== null &&
                ($name === static::SETTING_DISABLED && $cookieSetting === static::VALUE_FALSE) === false
            ) {
                // We must not overwrite a disabled=true with local cookie settings!
                // Otherwise it could get enabled locally, which might be a security
                // issue.
                $model->setValue($cookieSetting)->setSource('Local cookie settings');
                $this->settings[$name] = $model;
                return $this;
            }
        }

        // Do we have a value in the ini?
        $iniSettings = $this->iniConfig->getConfigFromFile($section, $name);
        if (isset($iniSettings) === true) {
            $model->setValue($iniSettings)->setSource('Krexx.ini settings');
            $this->settings[$name] = $model;
            return $this;
        }

        // Nothing yet? Give back factory settings.
        $model->setValue($this->feConfigFallback[$name][static::VALUE])->setSource('Factory settings');
        $this->settings[$name] = $model;

        return $this;
    }
public function loadConfigValue($name)
    {
        $feConfig = $this->iniConfig->getFeConfig($name);
        $section = $this->feConfigFallback[$name][static::SECTION];
        /** @var Model $model */
        $model = $this->pool->createClass('Brainworxx\\Krexx\\Service\\Config\\Model')
            ->setSection($section)
            ->setEditable($feConfig[0])
            ->setType($feConfig[1]);

        // Do we accept cookie settings here?
        if ($feConfig[0] === true) {
            $cookieSetting = $this->cookieConfig->getConfigFromCookies($section, $name);
            // Do we have a value in the cookies?
            if ($cookieSetting  !== null &&
                ($name === static::SETTING_DISABLED && $cookieSetting === static::VALUE_FALSE) === false
            ) {
                // We must not overwrite a disabled=true with local cookie settings!
                // Otherwise it could get enabled locally, which might be a security
                // issue.
                $model->setValue($cookieSetting)->setSource('Local cookie settings');
                $this->settings[$name] = $model;
                return $this;
            }
        }

        // Do we have a value in the ini?
        $iniSettings = $this->iniConfig->getConfigFromFile($section, $name);
        if (isset($iniSettings) === true) {
            $model->setValue($iniSettings)->setSource('Krexx.ini settings');
            $this->settings[$name] = $model;
            return $this;
        }

        // Nothing yet? Give back factory settings.
        $model->setValue($this->feConfigFallback[$name][static::VALUE])->setSource('Factory settings');
        $this->settings[$name] = $model;

        return $this;
    }
public function loadConfigValue ( $ name ) { $ feConfig = $ this -> iniConfig -> getFeConfig ( $ name ) ; $ section = $ this -> feConfigFallback [ $ name ] [ static :: SECTION ] ; /** @var Model $model */ $ model = $ this -> pool -> createClass ( 'Brainworxx\\Krexx\\Service\\Config\\Model' ) -> setSection ( $ section ) -> setEditable ( $ feConfig [ 0 ] ) -> setType ( $ feConfig [ 1 ] ) ; // Do we accept cookie settings here? if ( $ feConfig [ 0 ] === true ) { $ cookieSetting = $ this -> cookieConfig -> getConfigFromCookies ( $ section , $ name ) ; // Do we have a value in the cookies? if ( $ cookieSetting !== null && ( $ name === static :: SETTING_DISABLED && $ cookieSetting === static :: VALUE_FALSE ) === false ) { // We must not overwrite a disabled=true with local cookie settings! // Otherwise it could get enabled locally, which might be a security // issue. $ model -> setValue ( $ cookieSetting ) -> setSource ( 'Local cookie settings' ) ; $ this -> settings [ $ name ] = $ model ; return $ this ; } } // Do we have a value in the ini? $ iniSettings = $ this -> iniConfig -> getConfigFromFile ( $ section , $ name ) ; if ( isset ( $ iniSettings ) === true ) { $ model -> setValue ( $ iniSettings ) -> setSource ( 'Krexx.ini settings' ) ; $ this -> settings [ $ name ] = $ model ; return $ this ; } // Nothing yet? Give back factory settings. $ model -> setValue ( $ this -> feConfigFallback [ $ name ] [ static :: VALUE ] ) -> setSource ( 'Factory settings' ) ; $ this -> settings [ $ name ] = $ model ; return $ this ; }
Load values of the kreXX's configuration.

@param string $name
The name of the config value.

@return $this
Return this, for chaining.
Load values of the kreXX s configuration .