src/Parser/ParserAbstract.php
protected function headerToArray(MessageInterface $message, $header)
    {
        $lines = explode(Http::NEW_LINE, $header);

        foreach ($lines as $line) {
            $parts = explode(':', $line, 2);

            if (isset($parts[0]) && isset($parts[1])) {
                $key   = $parts[0];
                $value = substr($parts[1], 1);

                $message->addHeader($key, $value);
            }
        }
    }
protected function headerToArray(MessageInterface $message, $header)
    {
        $lines = explode(Http::NEW_LINE, $header);

        foreach ($lines as $line) {
            $parts = explode(':', $line, 2);

            if (isset($parts[0]) && isset($parts[1])) {
                $key   = $parts[0];
                $value = substr($parts[1], 1);

                $message->addHeader($key, $value);
            }
        }
    }
protected function headerToArray ( MessageInterface $ message , $ header ) { $ lines = explode ( Http :: NEW_LINE , $ header ) ; foreach ( $ lines as $ line ) { $ parts = explode ( ':' , $ line , 2 ) ; if ( isset ( $ parts [ 0 ] ) && isset ( $ parts [ 1 ] ) ) { $ key = $ parts [ 0 ] ; $ value = substr ( $ parts [ 1 ] , 1 ) ; $ message -> addHeader ( $ key , $ value ) ; } } }
Parses an raw http header string into an Message object

@param \PSX\Http\MessageInterface $message
@param string $header
Parses an raw http header string into an Message object