public function importHeaders(MessageInterface $from, $to)
    {
        foreach ($from->getHeaders() as $key => $headers) {
            foreach ($headers as $header) {
                $to->addHeader($key, $from->getHeaderLine($key));
            }
        }
    }
public function importHeaders(MessageInterface $from, $to)
    {
        foreach ($from->getHeaders() as $key => $headers) {
            foreach ($headers as $header) {
                $to->addHeader($key, $from->getHeaderLine($key));
            }
        }
    }
public function importHeaders ( MessageInterface $ from , $ to ) { foreach ( $ from -> getHeaders ( ) as $ key => $ headers ) { foreach ( $ headers as $ header ) { $ to -> addHeader ( $ key , $ from -> getHeaderLine ( $ key ) ) ; } } }
PSR-7 interfaces support multiple headers per type, whereas SilverStripe classes do not.

This method will assign headers as a comma delimited string from the PSR-7 interface to the SilverStripe class

@param MessageInterface         $from
@param HTTPRequest|HTTPResponse $to
PSR - 7 interfaces support multiple headers per type whereas SilverStripe classes do not .