You are here

protected function ServicesRESTServerFactory::getEndpointSettings in Services 7.3

2 calls to ServicesRESTServerFactory::getEndpointSettings()
ServicesRESTServerFactory::getFormatters in servers/rest_server/includes/ServicesRESTServerFactory.inc
ServicesRESTServerFactory::getParsers in servers/rest_server/includes/ServicesRESTServerFactory.inc

File

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

Class

ServicesRESTServerFactory
Factory class to build RESTServer object.

Code

protected function getEndpointSettings() {
  static $settings;
  if (empty($settings)) {
    $endpoint = $this
      ->getEndpoint();

    // Get the server settings from the endpoint.
    $settings = !empty($endpoint->server_settings) ? $endpoint->server_settings : array();

    // Normalize the settings so that we get the expected structure
    // and sensible defaults.
    $settings = rest_server_setup_settings($settings);
  }
  return $settings;
}