protected function morphResponseIfNeeded($response)
    {

        $contentType = $this->detectContentType($response);

        if ($newResponse = $this->getFromListeners($contentType, $response)) {
            return $newResponse;
        }

    }
protected function morphResponseIfNeeded($response)
    {

        $contentType = $this->detectContentType($response);

        if ($newResponse = $this->getFromListeners($contentType, $response)) {
            return $newResponse;
        }

    }
protected function morphResponseIfNeeded ( $ response ) { $ contentType = $ this -> detectContentType ( $ response ) ; if ( $ newResponse = $ this -> getFromListeners ( $ contentType , $ response ) ) { return $ newResponse ; } }
Does the actual work. Looks if a morpher is set and call it if needed

@param mixed $response
@return null|$response
Does the actual work . Looks if a morpher is set and call it if needed