src/SnooPHP/Http/Response.php
public function header($header = [])
	{
		if (is_array($header))
			$this->headers = array_merge($this->headers, $header);
		
		return is_string($header) ? ($this->headers[$header] ?? null) : $this->headers;
	}
public function header($header = [])
	{
		if (is_array($header))
			$this->headers = array_merge($this->headers, $header);
		
		return is_string($header) ? ($this->headers[$header] ?? null) : $this->headers;
	}
public function header ( $ header = [ ] ) { if ( is_array ( $ header ) ) $ this -> headers = array_merge ( $ this -> headers , $ header ) ; return is_string ( $ header ) ? ( $ this -> headers [ $ header ] ?? null ) : $ this -> headers ; }
Get or set header

If $header is a string, the method returns the associated value. in any other case, the full array of headers is returned
if $header is an array, the list of headers is appended to the current one

@param string|null|array $header name of header to retrieve, null or list of headers to append

@return string|array
Get or set header