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(); }
function prepareEmpty() { $id = new \modl\ItemDAO(); $view = $this->tpl(); $view->assign('servers', $id->getGroupServers()); $html = $view->draw('_group_empty', true); return $html; }
private function prepareServer($server) { $id = new \modl\ItemDAO(); $view = $this->tpl(); $view->assign('nodes', $id->getItems($server)); $view->assign('server', $server); $html = $view->draw('_groups_server', true); return $html; }