public function getConfig($name)
    {
        $this->requireConfig();

        if (!property_exists($this->cfg, $name)) {
            throw new \RuntimeException(sprintf('Failed to find $CFG->%s in Moodle config file', $name));
        }

        return $this->cfg->$name;
    }
public function getConfig($name)
    {
        $this->requireConfig();

        if (!property_exists($this->cfg, $name)) {
            throw new \RuntimeException(sprintf('Failed to find $CFG->%s in Moodle config file', $name));
        }

        return $this->cfg->$name;
    }
public function getConfig ( $ name ) { $ this -> requireConfig ( ) ; if ( ! property_exists ( $ this -> cfg , $ name ) ) { throw new \ RuntimeException ( sprintf ( 'Failed to find $CFG->%s in Moodle config file' , $ name ) ) ; } return $ this -> cfg -> $ name ; }
Get a Moodle config value.

@param string $name the config name

@return string
Get a Moodle config value .