protected function configure(Response $response, $contentType=null)
    {
        if (!$contentType) {
            return $response;
        }

        if (strtolower($contentType) == strtolower($this->serializer->mimeType())) {
            $response->setSerializer($this->serializer);
        }

        return $response;
    }
protected function configure(Response $response, $contentType=null)
    {
        if (!$contentType) {
            return $response;
        }

        if (strtolower($contentType) == strtolower($this->serializer->mimeType())) {
            $response->setSerializer($this->serializer);
        }

        return $response;
    }
protected function configure ( Response $ response , $ contentType = null ) { if ( ! $ contentType ) { return $ response ; } if ( strtolower ( $ contentType ) == strtolower ( $ this -> serializer -> mimeType ( ) ) ) { $ response -> setSerializer ( $ this -> serializer ) ; } return $ response ; }
Configure the response. Just set the right serializer.

@param Response $response
@param null $contentType

@return Response
Configure the response . Just set the right serializer .