public function RestResponse::__get in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 src/Rest/RestResponse.php \Drupal\salesforce\Rest\RestResponse::__get()
- 5.0.x src/Rest/RestResponse.php \Drupal\salesforce\Rest\RestResponse::__get()
Magic getter method to return the given property.
Parameters
string $key: The property name.
Return value
mixed The property value.
Throws
\Exception If $key property does not exist.
File
- src/
Rest/ RestResponse.php, line 55
Class
- RestResponse
- Class RestResponse.
Namespace
Drupal\salesforce\RestCode
public function __get($key) {
if (!property_exists($this, $key)) {
throw new \Exception("Undefined property {$key}");
}
return $this->{$key};
}