* @revision 03 * @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 */ require_once ("oscar/snac/feedbag/items.php"); class Oscar_SNAC_Feedbag_Insert extends Oscar_SNAC_Feedbag_Items { /* About this class */ const SNAC_FAMILY = 0x0013; const SNAC_SERVICE = 0x0008; // {{{ parse /** * Parse response from server * * @access public * @return void */ public function parse () { // Parse items on this SNAC parent::parse (); // Determin which function we are in if ($this instanceof Oscar_SNAC_Feedbag_Update) $func = "update"; elseif ($this instanceof Oscar_SNAC_Feedbag_Remove) $func = "remove"; else $func = "add"; // Forward items to our roster if (is_object ($Parent = self::getOSCAR ()) && is_object ($Roster = $Parent->getRoster ()) && is_object ($Transaction = $Roster->getLocalTransaction ())) $Transaction->$func ($this->Items); // Do some debuggin print "Roster-Transaction $func \n"; foreach ($this->Items as $Item) print " " . $Item->Name . " / " . $Item->GroupID . " / " . $Item->ItemID . " / " . $Item->Type . "\n"; } // }}} // {{{ generate /** * Prepare this SNAC to be submitted * * @access public * @return string */ public function generate () { return parent::generate (); } // }}} } ?>