* @revision 01 * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 3.0 Germany * @homepage http://oss.tiggerswelt.net/oscar/ * @copyright Copyright © 2009 tiggersWelt.net */ class Oscar_TLV_Helper_a16 extends Oscar_TLV { /* Value of this TLV */ public $Values = array (); // {{{ parse /** * Parse this TLV * * @access public * @return void */ public function parse () { while (strlen ($this->Data) > 1) $this->Values [] = Oscar_Common::str2int16 ($this->Data, 0, true); } // }}} // {{{ generate /** * Generate a string from this TLV * * @access public * @return string */ public function generate () { $this->Data = ""; foreach ($this->Values as $Value) $this->Data .= Oscar_Common::int16tostr ($Value); return parent::generate (); } // }}} } ?>