public function accept(MediaType $contentType) { if ($this->contentType === null) { return true; } elseif (is_string($this->contentType)) { return $this->contentType == $contentType->getName(); } elseif (is_callable($this->contentType)) { return call_user_func_array($this->contentType, array($contentType)); } return false; }
public function accept(MediaType $contentType) { return in_array($contentType->getName(), MediaType\Xml::getMediaTypes()) || substr($contentType->getSubType(), -4) == '+xml' || substr($contentType->getSubType(), -4) == '/xml'; }
public function isContentTypeSupported(MediaType $contentType) { return $contentType->getName() == self::$mime; }
public function accept(MediaType $contentType) { return $contentType->getName() == 'application/jsonx+xml'; }
public function isContentTypeSupported(MediaType $contentType) { return $contentType->getName() == 'application/x-www-form-urlencoded'; }
public static function isMediaType(MediaType $mediaType) { return in_array($mediaType->getName(), self::$mediaTypes) || substr($mediaType->getSubType(), -4) == '+xml' || substr($mediaType->getSubType(), -4) == '/xml'; }