Skip to content

Commit

Permalink
Addition of option 'premium' to the DNS create request
Browse files Browse the repository at this point in the history
  • Loading branch information
metaregistrar committed May 15, 2023
1 parent cf68cf3 commit ba95123
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ class metaregCreateDnsRequest extends metaregDnsRequest {
*
* format of dns records: array with keys type, name, content, ttl, priority
*/
public function __construct(eppDomain $domain, array $records) {
public function __construct(eppDomain $domain, array $records, bool $premium = false) {
parent::__construct(eppRequest::TYPE_CREATE);
if (!strlen($domain->getDomainname())) {
throw new eppException('Domain object does not contain a valid domain name');
}
$dname = $this->createElement('dns-ext:name', $domain->getDomainname());
$this->dnsObject->appendChild($dname);
if ($premium) {
$dpremium = $this->createElement('dns-ext:premium','true');
$this->dnsObject->appendChild($dpremium);
}

$this->records = $records;
foreach ($records as $record) {
$recordElem = $this->createElement('dns-ext:content');
Expand Down

0 comments on commit ba95123

Please sign in to comment.