You are here

public function ServicesContext::buildFromGlobals in Services 7.3

Build all context data from global variables.

Overrides ServicesContextInterface::buildFromGlobals

File

servers/rest_server/includes/ServicesContext.inc, line 41

Class

ServicesContext

Code

public function buildFromGlobals() {
  $this->data['get'] = $_GET;
  $this->data['server'] = $_SERVER;
  $this->data['post'] = $_POST;
  $this->data['request_body'] = '';
  if ($this
    ->isRequestHasPostBody()) {
    $this->data['request_body'] = $this
      ->getRequestBodyData();
  }
}