public function fromHeader($header = null, $default = null)
    {
        if ($header === null) {
            return $this->event->getRequest()->getHeaders($header, $default)->toArray();
        }
    
        return $this->event->getRequest()->getHeaders($header, $default);
    }
public function fromHeader($header = null, $default = null)
    {
        if ($header === null) {
            return $this->event->getRequest()->getHeaders($header, $default)->toArray();
        }
    
        return $this->event->getRequest()->getHeaders($header, $default);
    }
Return all header parameters or a single header parameter.

@param  string $header Header name to retrieve, or null to get all.
@param  mixed $default Default value to use when the requested header is missing.
@return null|\Zend\Http\Header\HeaderInterface