class RestResponseResources in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 src/Rest/RestResponseResources.php \Drupal\salesforce\Rest\RestResponseResources
- 8.3 src/Rest/RestResponseResources.php \Drupal\salesforce\Rest\RestResponseResources
Class RestResponseResources.
@package Drupal\salesforce\Rest
Hierarchy
- class \Drupal\salesforce\Rest\RestResponse extends \GuzzleHttp\Psr7\Response uses StringTranslationTrait
- class \Drupal\salesforce\Rest\RestResponseResources
Expanded class hierarchy of RestResponseResources
1 file declares its use of RestResponseResources
- RestClientTest.php in tests/
src/ Unit/ RestClientTest.php
File
- src/
Rest/ RestResponseResources.php, line 10
Namespace
Drupal\salesforce\RestView source
class RestResponseResources extends RestResponse {
/**
* List of API endpoint paths.
*
* Accessible via RestResponse:__get()
*
* @var array
*/
protected $resources;
/**
* RestResponseResources constructor.
*
* See https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_discoveryresource.htm.
*
* @param \Drupal\salesforce\Rest\RestResponse $response
* The response.
*/
public function __construct(RestResponse $response) {
parent::__construct($response->response);
foreach ($response->data as $key => $path) {
$this->resources[$key] = $path;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RestResponse:: |
protected | property | The json-decoded response body. | |
RestResponse:: |
protected | property | The original Response used to build this object. | |
RestResponse:: |
private | function | Helper function to eliminate repetitive json parsing. | |
RestResponse:: |
public | function | Magic getter method to return the given property. | |
RestResponseResources:: |
protected | property | List of API endpoint paths. | |
RestResponseResources:: |
public | function |
RestResponseResources constructor. Overrides RestResponse:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |