public function handle($stanza, $parent = false) { $evt = new \Event(); $tab = array(); $nd = new \modl\ItemDAO(); $n = new \modl\Item(); $n->setMetadata($stanza->query->x, $this->_to, $this->_node); $nd->set($n); $evt->runEvent('pubsubmetadata', array($this->_to, $this->_node)); }
public function handle($stanza, $parent = false) { $id = new \modl\ItemDAO(); $i = $id->getItem($this->_to, $this->_node); if (!$i) { $i = new \modl\Item(); } if (isset($stanza->query->x)) { $i->setMetadata($stanza->query->x, $this->_to, $this->_node); } $id->set($i); $this->pack([$this->_to, $this->_node]); $this->deliver(); }