You are here

public function ServicesContentTypeNegotiator::mimeParse in Services 7.3

Create a instance of the Mimeparse utility class.

Return value

Mimeparse

1 call to ServicesContentTypeNegotiator::mimeParse()
ServicesContentTypeNegotiator::getResponseFormatContentTypeNegotiations in servers/rest_server/includes/ServicesContentTypeNegotiator.inc
Determine response format and mime type using headers to negotiate content types.

File

servers/rest_server/includes/ServicesContentTypeNegotiator.inc, line 103

Class

ServicesContentTypeNegotiator
Class used to do Content Type negotiation.

Code

public function mimeParse() {
  static $mimeparse;
  if (!$mimeparse) {
    module_load_include('php', 'rest_server', 'lib/mimeparse');
    $mimeparse = new Mimeparse();
  }
  return $mimeparse;
}