public function negotiateRdfContentType($acceptHeader) { $contentTypes = array('application/rdf+xml', 'text/turtle', 'application/ld+json'); $negotiationResults = array(); $negotiatedType = http_negotiate_content_type($contentTypes, $negotiationResults); if (!empty($negotiationResults)) { return RdfType::getByMimeType($negotiatedType); } return null; }
public function testGetByMimeTypeUnknown() { $this->assertNull(RdfType::getByMimeType('text/html')); }