Info.php 813 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @package Net_EPP
  4. */
  5. abstract class Net_EPP_Frame_Command_Info extends Net_EPP_Frame_Command {
  6. function __construct($type) {
  7. parent::__construct('info', $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 setAuthInfo($authInfo) {
  19. $el = $this->createObjectPropertyElement('authInfo');
  20. $el->appendChild($this->createObjectPropertyElement('pw'));
  21. $el->firstChild->appendChild($this->createTextNode($authInfo));
  22. $this->payload->appendChild($el);
  23. }
  24. }
  25. ?>