Merge branch 'master' into fix-refresh-cache
This commit is contained in:
@@ -52,7 +52,7 @@ class DNS implements API
|
||||
}
|
||||
|
||||
if (!empty($priority)) {
|
||||
$options['priority'] = $priority;
|
||||
$options['priority'] = (int)$priority;
|
||||
}
|
||||
|
||||
$user = $this->adapter->post('zones/' . $zoneID . '/dns_records', $options);
|
||||
|
||||
@@ -158,10 +158,10 @@ class Zones implements API
|
||||
return false;
|
||||
}
|
||||
|
||||
public function cachePurge(string $zoneID, array $files = null, array $tags = null): bool
|
||||
public function cachePurge(string $zoneID, array $files = null, array $tags = null, array $hosts = null): bool
|
||||
{
|
||||
if ($files === null && $tags === null) {
|
||||
throw new EndpointException('No files or tags to purge.');
|
||||
if ($files === null && $tags === null && $hosts === null) {
|
||||
throw new EndpointException('No files, tags or hosts to purge.');
|
||||
}
|
||||
|
||||
$options = [];
|
||||
@@ -172,6 +172,10 @@ class Zones implements API
|
||||
if (!is_null($tags)) {
|
||||
$options['tags'] = $tags;
|
||||
}
|
||||
|
||||
if (!is_null($hosts)) {
|
||||
$options['tags'] = $tags;
|
||||
}
|
||||
|
||||
$user = $this->adapter->delete('zones/' . $zoneID . '/purge_cache', $options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user