You are here

protected function ServicesRESTServerFactory::getParsers in Services 7.3

1 call to ServicesRESTServerFactory::getParsers()
ServicesRESTServerFactory::getRESTServer in servers/rest_server/includes/ServicesRESTServerFactory.inc
1 method overrides ServicesRESTServerFactory::getParsers()
MockServicesRESTServerFactory::getParsers in servers/rest_server/tests/rest_server_mock_classes.inc

File

servers/rest_server/includes/ServicesRESTServerFactory.inc, line 78

Class

ServicesRESTServerFactory
Factory class to build RESTServer object.

Code

protected function getParsers() {
  $settings = $this
    ->getEndpointSettings();
  $parsers = rest_server_request_parsers();

  // Remove parsers that have been disabled for this endpoint.
  foreach (array_keys($parsers) as $key) {
    if (!$settings['parsers'][$key]) {
      unset($parsers[$key]);
    }
  }
  return $parsers;
}