private function createParserWith(StreamInterface $body)
    {
        $class = NullParser::class;
        foreach (self::$parsers as $parser => $contentTypes) {
            foreach ($contentTypes as $contentType) {
                if (stripos($this->contentType, $contentType) !== false) {
                    $class = $parser;
                }
            }
        }
        return new $class($body);
    }
private function createParserWith(StreamInterface $body)
    {
        $class = NullParser::class;
        foreach (self::$parsers as $parser => $contentTypes) {
            foreach ($contentTypes as $contentType) {
                if (stripos($this->contentType, $contentType) !== false) {
                    $class = $parser;
                }
            }
        }
        return new $class($body);
    }
private function createParserWith ( StreamInterface $ body ) { $ class = NullParser :: class ; foreach ( self :: $ parsers as $ parser => $ contentTypes ) { foreach ( $ contentTypes as $ contentType ) { if ( stripos ( $ this -> contentType , $ contentType ) !== false ) { $ class = $ parser ; } } } return new $ class ( $ body ) ; }
Creates the parser based on the parsers map with provided stream

@param StreamInterface $body

@return BodyParserInterface
Creates the parser based on the parsers map with provided stream