-
Notifications
You must be signed in to change notification settings - Fork 164
/
Copy pathatEppUndeleteRequest.php
44 lines (33 loc) · 1.32 KB
/
atEppUndeleteRequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace Metaregistrar\EPP;
class atEppUndeleteRequest extends eppDomainRequest
{
use atEppCommandTrait;
/**
* atEppUndeleteRequest constructor.
* @param eppDomain $domain
* @param atEppExtensionChain|null $atEppExtensionChain
*/
function __construct(eppDomain $domain, ?atEppExtensionChain $atEppExtensionChain = null) {
$this->atEppExtensionChain = $atEppExtensionChain;
parent::__construct(eppRequest::TYPE_UPDATE);
$domainname = $domain->getDomainname();
$this->domainobject->appendChild($this->createElement('domain:name', $domainname));
$this->setUndeleteExt();
$this->epp->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$this->addSessionId();
}
/**
* set's the RGP-Extension
*/
protected function setUndeleteExt() {
$updExt = $this->createElement('rgp:update');
$updExt->setAttribute('xmlns:rgp',"urn:ietf:params:xml:ns:rgp-1.0" );
$updExt->setAttribute('xsi:schemaLocation', "urn:ietf:params:xml:ns:rgp-1.0 rgp-1.0.xsd");
$restoreCmd = $this->createElement('rgp:restore');
$restoreCmd->setAttribute('op', "request");
$updExt->appendChild($restoreCmd);
$this->getExtension()->appendChild($updExt);
$this->setAtExtensions();
}
}