Implement exportzone

This commit is contained in:
Mark Schouten 2016-08-04 12:07:14 +02:00
parent 5161f7102b
commit d94d1da445

View file

@ -43,10 +43,20 @@ class PdnsAPI {
return $api->json;
}
public function exportzone($zoneid) {
$api = clone $this->http;
$api->method = 'GET';
$api->url = "/servers/localhost/zones/$zoneid/export";
$api->call();
return $api->json;
}
public function savezone($zone) {
$api = clone $this->http;
// We have to split up RRSets and Zoneinfo.
// First, update the zone
$zonedata = $zone;
unset($zonedata['id']);
unset($zonedata['url']);