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;
    }