League\CommonMark\Util\Configuration::getConfigByPath PHP 메소드

getConfigByPath() 보호된 메소드

protected getConfigByPath ( string $keyPath, string | null $default = null ) : mixed
$keyPath string
$default string | null
리턴 mixed
    protected function getConfigByPath($keyPath, $default = null)
    {
        $keyArr = explode('/', $keyPath);
        $data = $this->config;
        foreach ($keyArr as $k) {
            if (!is_array($data) || !isset($data[$k])) {
                return $default;
            }
            $data = $data[$k];
        }
        return $data;
    }