/** * Get generated id. * * @return string */ public function getId() { if (null === $this->id) { $this->id = XML::generateId(); } return $this->id; }
/** * Build XML message * @return type */ public function toString() { $query = "<iq type='set' id='%s'><query xmlns='jabber:iq:register'><username>%s</username><password>%s</password><email>%s</email></query></iq>"; return XML::quoteMessage($query, XML::generateId(), (string) $this->username, (string) $this->password, (string) $this->email); }
/** * Build XML message. * * @return type */ public function toString() { $query = "<iq type='set' id='%s'><query xmlns='jabber:iq:register'><username>%s</username><password>%s</password><name>%s</name></query></iq>"; return XML::quoteMessage($query, XML::generateId(), $this->user->getUsername(), $this->user->getGuid(), $this->user->getFirstName() . ' ' . $this->user->getLastName()); }
/** * {@inheritDoc} */ public function toString() { return '<iq type="get" id="' . XML::generateId() . '" kk="rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"><query xmlns="jabber:iq:roster"/></iq>'; }
/** * {@inheritDoc} */ public function toString() { return XML::quoteMessage('<message type="%s" id="%s" to="%s"><body>%s</body></message>', $this->getType(), XML::generateId(), $this->getTo(), $this->getMessage()); }