Transfer.php 893 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @package Net_EPP
  4. */
  5. abstract class Net_EPP_Frame_Command_Transfer extends Net_EPP_Frame_Command {
  6. function __construct($type) {
  7. parent::__construct('transfer', $type);
  8. }
  9. function setObject($object) {
  10. $type = strtolower(str_replace(__CLASS__.'_', '', get_class($this)));
  11. foreach ($this->payload->childNodes as $child) $this->payload->removeChild($child);
  12. $this->payload->appendChild($this->createElementNS(
  13. Net_EPP_ObjectSpec::xmlns($type),
  14. $type.':'.Net_EPP_ObjectSpec::id($type),
  15. $object
  16. ));
  17. }
  18. function setOp($op) {
  19. $this->command->setAttribute('op', $op);
  20. }
  21. function setAuthInfo($authInfo) {
  22. $el = $this->createObjectPropertyElement('authInfo');
  23. $el->appendChild($this->createObjectPropertyElement('pw'));
  24. $el->firstChild->appendChild($this->createTextNode($authInfo));
  25. $this->payload->appendChild($el);
  26. }
  27. }
  28. ?>