public static function getHeadersAsString(MessageInterface $message)
    {
        $result  = '';
        foreach ($message->getHeaders() as $name => $values) {
            $result .= "\r\n{$name}: " . implode(', ', $values);
        }

        return $result;
    }
public static function getHeadersAsString(MessageInterface $message)
    {
        $result  = '';
        foreach ($message->getHeaders() as $name => $values) {
            $result .= "\r\n{$name}: " . implode(', ', $values);
        }

        return $result;
    }
public static function getHeadersAsString ( MessageInterface $ message ) { $ result = '' ; foreach ( $ message -> getHeaders ( ) as $ name => $ values ) { $ result .= "\r\n{$name}: " . implode ( ', ' , $ values ) ; } return $ result ; }
Gets the headers of a message as a string

@param MessageInterface $message

@return string
Gets the headers of a message as a string