public function AkamaiClientV3::setType in Akamai 8.3
Sets the type of purge.
Parameters
string $type: The type of purge, either 'url', 'tag' or 'cpcode'.
Return value
$this
Overrides AkamaiClientBase::setType
File
- src/
Plugin/ Client/ AkamaiClientV3.php, line 128
Class
- AkamaiClientV3
- Defines the CCUv3 client version for Akamai.
Namespace
Drupal\akamai\Plugin\ClientCode
public function setType($type) {
$valid_types = [
'cpcode',
'tag',
'url',
];
if (in_array($type, $valid_types)) {
$this->type = $type;
}
else {
throw new \InvalidArgumentException('Type must be one of: ' . implode(', ', $valid_types));
}
return $this;
}