public static function getStartLine(MessageInterface $message)
    {
        if ($message instanceof RequestInterface) {
            return trim($message->getMethod() . ' '
                . $message->getResource())
                . ' HTTP/' . $message->getProtocolVersion();
        } elseif ($message instanceof ResponseInterface) {
            return 'HTTP/' . $message->getProtocolVersion() . ' '
                . $message->getStatusCode() . ' '
                . $message->getReasonPhrase();
        } else {
            throw new \InvalidArgumentException('Unknown message type');
        }
    }
public static function getStartLine(MessageInterface $message)
    {
        if ($message instanceof RequestInterface) {
            return trim($message->getMethod() . ' '
                . $message->getResource())
                . ' HTTP/' . $message->getProtocolVersion();
        } elseif ($message instanceof ResponseInterface) {
            return 'HTTP/' . $message->getProtocolVersion() . ' '
                . $message->getStatusCode() . ' '
                . $message->getReasonPhrase();
        } else {
            throw new \InvalidArgumentException('Unknown message type');
        }
    }
public static function getStartLine ( MessageInterface $ message ) { if ( $ message instanceof RequestInterface ) { return trim ( $ message -> getMethod ( ) . ' ' . $ message -> getResource ( ) ) . ' HTTP/' . $ message -> getProtocolVersion ( ) ; } elseif ( $ message instanceof ResponseInterface ) { return 'HTTP/' . $ message -> getProtocolVersion ( ) . ' ' . $ message -> getStatusCode ( ) . ' ' . $ message -> getReasonPhrase ( ) ; } else { throw new \ InvalidArgumentException ( 'Unknown message type' ) ; } }
Gets the start line of a message

@param MessageInterface $message

@return string
@throws \InvalidArgumentException
Gets the start line of a message