public function VclHandler::getLastVersion in Fastly 8.3
Fetch last service version.
Return value
bool|int FALSE otherwise.
1 call to VclHandler::getLastVersion()
- VclHandler::__construct in src/
VclHandler.php - Sets data to be processed, sets Credentials Vcl_Handler constructor.
File
- src/
VclHandler.php, line 732
Class
- VclHandler
- Class to control the VCL handling.
Namespace
Drupal\fastlyCode
public function getLastVersion() {
$url = $this->versionBaseUrl;
$response = $this
->vclGetWrapper($url, $this->headersGet);
$response_data = json_decode($response
->getBody());
$this->nextClonedVersionNum = count($response_data) + 1;
foreach ($response_data as $version_data) {
if ($version_data->active) {
return $version_data;
}
}
return FALSE;
}