Add Record

use solutedns\Dns\Records;
$records = new Records();
$records->add(array);

Attributes:

domainstring
Zone name
recordsarray
Array of records to be added to the zone

namestring
Record name
typestring
Record type
contentstring
Record content
ttlint
Record Time To Live
prioint
Record priority
array(
  'domain' => 'example.com',
  'records' => array(
    array(
      'name' => 'example.com',
      'type' => 'A',
      'content' => '192.168.2.1',
      'ttl' => 3600,
      'prio' => 0,
    ),
  ),
);
'success' => array {
  [0]=> array {
    'id' => '2315'
    'type' => 'A'
    'content' => '192.168.2.1'
    'name' => 'example.com'
    'prio' => '0'
    ttl' => '3600'
  }
}
DNS
'errors' => array {
  [0]=> array {
    'record' =>  array {
      'type' => 'A'
      'content' => '192.168.2.999'
      'name' => 'example.com'
      'prio' => '0'
      'ttl' => '3600'
    }
    'code' => 'INVALID_IPV6'
    'field' => 'content'
    'desc' => 'IPv4 address does not seem to be valid.'
  }
}

System
array {
  'error' => array {
    'code' => 3001
    'desc' => 'Zone could not be found.'
  }
}

Edit Record

use solutedns\Dns\Records;
$records = new Records();
$records->edit(array);

Attributes:

domainstring
Zone name
recordsarray
Array of records to edit

idint
Record ID
namestring
Record name
typestring
Record type
contentstring
Record content
ttlint
Record Time To Live
prioint
Record priority
array(
  'domain' => 'example.com',
  'records' => array(
    array(
      'id' => 34,
      'name' => 'example.com',
      'type' => 'A',
      'content' => '192.168.2.1',
      'ttl' => 3600,
      'prio' => 0,
    ),
  ),
);
'success' => array {
  [0]=> array {
    'id' => '34'
    'type' => 'A'
    'content' => '127.0.0.1'
    'name' => 'example.com'
    'prio' => '0'
    ttl' => '3600'
  }
}
DNS
'errors' => array {
  [0]=> array {
    'record' =>  array {
      'id' => '36'
      'type' => 'A'
      'content' => '192.168.2.120'
      'name' => 'example.com'
      'prio' => '0'
      'ttl' => '3600'
    }
    'code' => 'RECORD_NOT_FOUND'
    'field' => NULL
    'desc' => 'Record has not been found.'
  }
}

System
array {
  'error' => array {
    'code' => 3001
    'desc' => 'Zone could not be found.'
  }
}

Delete Record

use solutedns\Dns\Records;
$records = new Records();
$records->delete(array);

Attributes:

domainstring
Zone name
recordsarray
Array of records to delete

idint
Record ID
array(
  'domain' => 'example.com',
  'records' => array(
    array(
      'id' => 16
    ),
    array(
      'id' => 22
    ),
  ),
);
'success' => array {
  [0]=> array {
    'id' => '34'
  }
}
DNS
'errors' => array {
  [0]=> array {
    'record' =>  array {
      'id' => '2204'
    }
    'code' => 'RECORD_NOT_FOUND'
    'field' => NULL
    'desc' => 'Record has not been found.'
  }
}

System
array {
  'error' => array {
    'code' => 3001
    'desc' => 'Zone could not be found.'
  }
}

Get Records

use solutedns\Dns\Records;
$records = new Records();
$records->get(string);

Attributes:

domainstring
Zone name to retrieve
$domain = 'example.com';
'records' => array {
  [0]=> array {
    'id' => '1906'
    'name' => 'example.com'
    'type' => 'SOA'
    'content' => 'ns0.solutedns.com hostmaster.example.com 2017091404 3600 600 604800 3600'
    'ttl' => '3600'
    'prio' => '0'
    'change_date' => NULL
    'disabled' => '0'
  }
  [1]=> array {
    'id' => '1907'
    'name' => 'example.com'
    'type' => 'NS'
    'content' => 'ns0.solutedns.com'
    'ttl' => '3600'
    'prio' => '0'
    'change_date' => '1505387755'
    'disabled' => '0'
  }
}
array {
  'error' => array {
    'code' => 3001
    'desc' => 'Zone could not be found.'
  }
}