protected function determineResponseType($availableTypes)
    {
        $bestType = $this->contentNegotiation->negotiateMedia($availableTypes);
        if ($bestType instanceof Accept\Media\MediaValue) {
            $contentType = $bestType->getValue();
            $subType = $bestType->getSubtype();
            $this->contentType = $contentType;
            return $contentType;
        }
    }
protected function determineResponseType($availableTypes)
    {
        $bestType = $this->contentNegotiation->negotiateMedia($availableTypes);
        if ($bestType instanceof Accept\Media\MediaValue) {
            $contentType = $bestType->getValue();
            $subType = $bestType->getSubtype();
            $this->contentType = $contentType;
            return $contentType;
        }
    }
protected function determineResponseType ( $ availableTypes ) { $ bestType = $ this -> contentNegotiation -> negotiateMedia ( $ availableTypes ) ; if ( $ bestType instanceof Accept \ Media \ MediaValue ) { $ contentType = $ bestType -> getValue ( ) ; $ subType = $ bestType -> getSubtype ( ) ; $ this -> contentType = $ contentType ; return $ contentType ; } }
Determines if the Accepts header types match what this responder is configured to return.
If not, we throw an exception.

@throws Exception\ContentTypeNotValidException
Determines if the Accepts header types match what this responder is configured to return . If not we throw an exception .