Get the header string

@param  string $name The header name
@param  mixed $default The default value
@param  bool $first Return the first element or the whole header values
@return mixed
505470
public function getHeader($name, $default = null, $first = true)
    {
        if (!isset($this->headers[$name])) {
            return $default;
        }

        if (is_array($this->headers[$name]) && $first) {
            return current($this->headers[$name]);
        }

        return $this->headers[$name];
    }
139733
public function get($name, $default = null)
    {
        $result = $default;
        if (array_key_exists($name, $this->_data)) {
            $result = $this->_data[$name];
        }
        return $result;
    }
1174875
private function getHeader($name)
    {
        if (isset($this->headers[$name])) {
            return $this->headers[$name];
        }
        return false;
    }
326885
public function get($name, $default = null)
    {
        if (isset($this->body[$name])) {
            return $this->body[$name];
        }

        return $default;
    }
35679
public function getWithDefault($name, $default)
    {
        $value = NestedArrayUtil::getNestedArrayValue(self::$config, explode('.', $name), $exists);
        if (!$exists) {
            return $default;
        }

        return $value;
    }
878726
public function get($name, $default = '')
    {
        $lines = $this->getLines($name);
        if(count($lines) === 0) {
            return $default;
        }
        
        return $this->implode($lines);
    }
1181072
public String getFirstHeader(String name) {
        List<String> headerValues = getHeader(name);

        if (headerValues == null || headerValues.size() == 0) {
            return null;
        }

        return headerValues.get(0);
    }
1276062
public function get(string $name, $default = null, $onlyReturnFirst = true)
    {
        if ($this->has($name)) {
            $value = $this->data[$this->normalizeName($name)];

            if ($onlyReturnFirst) {
                return $value[0];
            }
        } else {
            $value = $default;
        }

        return $value;
    }
285027
public function header(string $key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->getHeaders();
        }
        return $this->getHeader($key) ?? $default;
    }
108120
public function getHeader($header, $first = true)
    {
        $normalizedHeader = str_replace('-', '_', strtolower($header));
        foreach ($this->headers as $key => $value) {
            if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) {
                if ($first) {
                    return is_array($value) ? (count($value) ? $value[0] : '') : $value;
                }

                return is_array($value) ? $value : array($value);
            }
        }

        return $first ? null : array();
    }
1232768
public function get($name, $default = null)
    {
        return $this->has($name) ? (@$this->data[$name] ?: $this->data["wyswyg_$name"]) : $default;
    }
702828
public function getAttribute($name, $default = null)
    {
        if ($this->hasAttribute($name)) {
            return $this->node->getAttribute($name);
        }

        return $default;
    }
71187
public static function get($name = null, $default = null)
    {
        self::init();

        if (!$name) {
            return self::$config;
        } else {
            if (isset(self::$config[$name])) {
                return self::$config[$name];
            } else {
                return $default;
            }
        }
    }
415907
public static function getStr( $name, $default = '' ) {
		$var = getenv( $name );
		if ( $var !== false ) {
			$var = filter_var( $var,
				\FILTER_SANITIZE_STRING,
				\FILTER_FLAG_STRIP_LOW | \FILTER_FLAG_STRIP_HIGH
			);
		}
		return ( $var === false ) ? $default : $var;
	}
1341588
public function getResponseHeader($key, $first = true): string
    {
        $header = $this->response->getHeader($key);
        $headerFirst = $header[0] ?? '';
        return $first ? $headerFirst : $header;
    }
392329
public function getPropertyWithDefault($name, $default = null)
    {
        if (!array_key_exists($name, $this->data)) {
            return $default;
        }

        return $this->data[$name];
    }
1006920
public function get(string $name, $default = null)
    {
        return $this->has($name) ? $this->values[$name] : $default;
    }