protected function getConfigValue($name)
    {
        if (substr($name, 0, 1) != '/') {
            $name = '/' . $name;
        }
        $config = new JsonConfig(getcwd() . '/composer.json');
        $value  = $config->getConfigValue('/extra/contao' . $name);

        // Fallback to global config.
        if ($value === null) {
            /** @var JsonConfig $config */
            $config = $this->getApplication()->getConfig();
            if ($config !== null) {
                $value = $config->getConfigValue($name);
            }
        }

        return $value;
    }
protected function getConfigValue($name)
    {
        if (substr($name, 0, 1) != '/') {
            $name = '/' . $name;
        }
        $config = new JsonConfig(getcwd() . '/composer.json');
        $value  = $config->getConfigValue('/extra/contao' . $name);

        // Fallback to global config.
        if ($value === null) {
            /** @var JsonConfig $config */
            $config = $this->getApplication()->getConfig();
            if ($config !== null) {
                $value = $config->getConfigValue($name);
            }
        }

        return $value;
    }
protected function getConfigValue ( $ name ) { if ( substr ( $ name , 0 , 1 ) != '/' ) { $ name = '/' . $ name ; } $ config = new JsonConfig ( getcwd ( ) . '/composer.json' ) ; $ value = $ config -> getConfigValue ( '/extra/contao' . $ name ) ; // Fallback to global config. if ( $ value === null ) { /** @var JsonConfig $config */ $ config = $ this -> getApplication ( ) -> getConfig ( ) ; if ( $ config !== null ) { $ value = $ config -> getConfigValue ( $ name ) ; } } return $ value ; }
Fetch some value from the config.

First the value will be read from composer.json (section /extra/contao/...) and then from the global ctb config
(if any exists).

@param string $name The config value to retrieve.

@return mixed
Fetch some value from the config .