You are here

public function RestResponseResources::__construct in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Rest/RestResponseResources.php \Drupal\salesforce\Rest\RestResponseResources::__construct()
  2. 5.0.x src/Rest/RestResponseResources.php \Drupal\salesforce\Rest\RestResponseResources::__construct()

RestResponseResources constructor.

See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest....

Parameters

\Drupal\salesforce\Rest\RestResponse $response: The response.

Overrides RestResponse::__construct

File

src/Rest/RestResponseResources.php, line 29

Class

RestResponseResources
Class RestResponseResources.

Namespace

Drupal\salesforce\Rest

Code

public function __construct(RestResponse $response) {
  parent::__construct($response->response);
  foreach ($response->data as $key => $path) {
    $this->resources[$key] = $path;
  }
}