public function VclHandler::getSetting in Fastly 8.3
Fetches setting by condition name.
@name string
Return value
bool FALSE if response not returned or without version, TRUE otherwise.
1 call to VclHandler::getSetting()
- VclHandler::prepareSetting in src/
VclHandler.php - Prepares setting for insertion.
File
- src/
VclHandler.php, line 930
Class
- VclHandler
- Class to control the VCL handling.
Namespace
Drupal\fastlyCode
public function getSetting($name) {
$url = $this->versionBaseUrl . '/' . $this->lastClonedVersion . '/request_settings/' . $name;
$response = $this
->vclGetWrapper($url, $this->headersGet);
$responseBody = (string) $response
->getBody();
$_responseBody = json_decode($responseBody);
if (empty($_responseBody)) {
return FALSE;
}
if (!$_responseBody->version) {
return FALSE;
}
return TRUE;
}