code: 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);
      }
docs: 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