protected function detectContentType($response)
    {
        if (!$this->contentTypeDetector) {
            return $this->defaultContentType;
        }

        if ($contentType = call_user_func($this->contentTypeDetector, $response, $this)) {
            return $contentType;
        }

        return $this->defaultContentType;
    }
protected function detectContentType($response)
    {
        if (!$this->contentTypeDetector) {
            return $this->defaultContentType;
        }

        if ($contentType = call_user_func($this->contentTypeDetector, $response, $this)) {
            return $contentType;
        }

        return $this->defaultContentType;
    }
protected function detectContentType ( $ response ) { if ( ! $ this -> contentTypeDetector ) { return $ this -> defaultContentType ; } if ( $ contentType = call_user_func ( $ this -> contentTypeDetector , $ response , $ this ) ) { return $ contentType ; } return $ this -> defaultContentType ; }
Detects the content type

@param mixed $response
@return string
Detects the content type