Bluz\Common\Options::getOption PHP Method

getOption() public method

Get option by key
public getOption ( string $key, string | null $section = null ) : mixed
$key string
$section string | null
return mixed
    public function getOption($key, $section = null)
    {
        if (isset($this->options[$key])) {
            if (!is_null($section)) {
                return $this->options[$key][$section] ?? null;
            } else {
                return $this->options[$key];
            }
        } else {
            return null;
        }
    }