Commit b8a0fdc2 authored by maryoflaherty's avatar maryoflaherty
Browse files

dding functionality for deleting, updating, polling

parent e15db31f
......@@ -14,15 +14,17 @@
$this->command = $this->createElement($command);
$this->body->appendChild($this->command);
$this->payload = $this->createElementNS(
Net_EPP_ObjectSpec::xmlns($this->type),
$this->type.':'.$command
);
if ($this->type !== "") {
$this->payload = $this->createElementNS(
Net_EPP_ObjectSpec::xmlns($this->type),
$this->type.':'.$command
);
$this->command->appendChild($this->payload);
$this->command->appendChild($this->payload);
}
$this->clTRID = $this->createElement('clTRID');
$this->clTRID->appendChild($this->createTextNode());
$this->clTRID->appendChild($this->createTextNode('a'));
$this->body->appendChild($this->clTRID);
}
......@@ -48,5 +50,16 @@
);
}
function createExtensionElement($ext, $command) {
$this->extension = $this->createElement('extension');
$this->body->appendChild($this->extension);
$this->extension->payload = $this->createElementNS(
Net_EPP_ObjectSpec::xmlns($ext),
$ext.':'.$command
);
$this->extension->appendChild($this->extension->payload);
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Delete extends Net_EPP_Frame_Command {
function __construct($type) {
$this->type = $type;
parent::__construct('delete', $type);
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Delete_Contact extends Net_EPP_Frame_Command_Delete {
function __construct() {
parent::__construct('contact');
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Delete_Domain extends Net_EPP_Frame_Command_Delete {
function __construct() {
parent::__construct('domain');
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Delete_Host extends Net_EPP_Frame_Command_Delete {
function __construct() {
parent::__construct('host');
}
}
?>
<?php
/**
* @package Net_EPP
*/
abstract class Net_EPP_Frame_Command_Poll extends Net_EPP_Frame_Command {
function __construct() {
parent::__construct('poll', '');
}
function setOp($op) {
$this->command->setAttribute('op', $op);
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Poll_Ack extends Net_EPP_Frame_Command_Poll {
function __construct() {
parent::__construct();
$this->setOp('ack');
}
function setMsgID($id) {
$this->command->setAttribute('msgID', $id);
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Poll_Req extends Net_EPP_Frame_Command_Poll {
function __construct() {
parent::__construct();
$this->setOp('req');
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Update_Contact extends Net_EPP_Frame_Command_Update {
function __construct() {
parent::__construct('contact');
}
}
?>
<?php
/**
* @package Net_EPP
*/
class Net_EPP_Frame_Command_Update_Host extends Net_EPP_Frame_Command_Update {
function __construct() {
parent::__construct('host');
}
}
?>
......@@ -21,6 +21,11 @@
'id' => 'id',
'schema' => 'urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd',
),
'rgp' => array(
'xmlns' => 'urn:ietf:params:xml:ns:rgp-1.0',
'id' => 'id',
'schema' => 'urn:ietf:params:xml:ns:rgp-1.0 rgp-1.0.xsd',
),
);
static function id($object) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment