public function toBoolean()
    {
        $key = $this->toLowerCase()->scalarString;

        $map =
        [
            'true'  => true,
            '1'     => true,
            'on'    => true,
            'yes'   => true,
            'false' => false,
            '0'     => false,
            'off'   => false,
            'no'    => false
        ];

        if (array_key_exists($key, $map))
        {
            return $map[$key];
        }
        elseif (is_numeric($this->scalarString))
        {
            return ((int)$this->scalarString > 0);
        }
        else
        {
            return (bool)$this->regexReplace('[[:space:]]', '')->scalarString;
        }
    }