* @revision 05 * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 3.0 Germany * @homepage http://oss.tiggerswelt.net/xmpp * @copyright Copyright © 2008 tiggersWelt.net */ require_once ('phpEvents/socket/stream/xml/tag.php'); /** * Generic XMPP XML Paket * * @package tiggerXMPP * @class tiggerXMPP_Packet */ class tiggerXMPP_Packet extends phpEvents_Socket_Stream_XML_Tag { const TAG_FALLBACK = 1; // {{{ getLanguage /** * Retrive the XML-Language for this tag * * @access public * @return string **/ public function getLanguage () { $Language = parent::getLanguage (); if (($Language !== null) && (strlen ($Language) > 0)) return $Language; if (is_object ($S = $this->getStream ())) return $S->getLanguage (); return $Language; } // }}} // {{{ getOriginator /** * Retrive the current originator (source) of this packet * * @access public * @return string **/ public function getOriginator () { return $this->getAttribute ('from'); } // }}} // {{{ setOriginator /** * Set originator (source) of this packet * * @access public * @return void **/ public function setOriginator ($Value) { return $this->setAttribute ('from', $Value); } // }}} // {{{ getDestination /** * Retrive the destination of this packet * * @access public * @return string **/ public function getDestination () { return $this->getAttribute ('to'); } // }}} // {{{ setDestination /** * Set a destination for this packet * * @param string $Destination * * @access public * @return void **/ public function setDestination ($Value) { return $this->setAttribute ('to', $Value); } // }}} // {{{ getStream /** * Retrive handle of the assigned XMPP-Stream * * @access public * @return object **/ public function getStream () { # TODO: Implement this return false; } // }}} // {{{ appendError /** * Set an error-status for this packet * * @access public * @return void **/ public function appendError ($Error, $Text = '') { new tiggerXMPP_Error ($Error, $Text, $this); } // }}} } ?>