Lines Matching refs:this

51     $this->_usememorycache = $usememorycache;
57 $this->_container = new $container_classname();
61 if ($this->_container)
62 return $this->_container->getDefaultConfig();
68 if ($this->_container)
69 return $this->_container->init($c);
113 $this->setMeta("nickid-to-metadata", $nickid, 'nick', $nick);
114 $this->setMeta("metadata-to-nickid", 'nick', $this->encode($nick), $nickid);
129 $this->setMeta("nickid-to-channelid", $nickid, $this->encode($chan));
130 $this->setMeta("channelid-to-nickid", $this->encode($chan), $nickid);
133 if ($chan == 'SERVER') $this->updateNick($nickid);
161 $timestamp = $this->getMeta("channelid-to-nickid", $this->encode('SERVER'), $nickid);
165 $deleted_user["nick"][] = $this->getNickname($nickid);
170 $this->rmMeta('channelid-to-nickid', $this->encode($chan), $nickid);
171 $this->rmMeta('nickid-to-channelid', $nickid, $this->encode($chan));
181 $ret = $this->getOnlineNick($chan);
184 $this->rmMeta('channelid-to-msg', $this->encode($chan));
185 $this->rmMeta('channelid-to-msgid', $this->encode($chan));
190 $channels = $this->getMeta("nickid-to-channelid",$nickid);
196 $this->rmMeta('metadata-to-nickid', 'nick', $this->encode($this->getNickname($nickid)));
198 $this->rmMeta('nickid-to-metadata', $nickid);
200 $this->rmMeta("nickid-to-cmdtoplay", $nickid);
201 $this->rmMeta("nickid-to-cmdtoplayid", $nickid);
218 $this->setMeta("nickid-to-channelid", $nickid, $this->encode($chan));
219 $this->setMeta("channelid-to-nickid", $this->encode($chan), $nickid);
234 $oldnickid = $this->getNickId($oldnick);
235 $newnickid = $this->getNickId($newnick);
240 $this->rmMeta("metadata-to-nickid", 'nick', $this->encode($oldnick));
243 $this->setMeta("nickid-to-metadata", $oldnickid, 'nick', $newnick);
244 $this->setMeta("metadata-to-nickid", 'nick', $this->encode($newnick), $oldnickid);
257 $nickid = $this->getMeta("metadata-to-nickid", 'nick', $this->encode($nick), true);
269 $nick = $this->getMeta("nickid-to-metadata", $nickid, 'nick', true);
270 $nick = isset($nick["value"][0]) ? $this->decode($nick["value"][0]) : "";
288 $ret = $this->getMeta("channelid-to-nickid", $this->encode('SERVER'));
297 $ret2 = $this->getMeta("nickid-to-channelid",$nickid);
300 $userchan = $this->decode($userchan);
304 $this->removeNick($userchan, $nickid);
310 $du = $this->removeNick('SERVER', $nickid);
335 $ret = $this->getMeta("channelid-to-nickid", $this->encode($chan));
341 $timestamp = $this->getMeta("channelid-to-nickid", $this->encode('SERVER'), $nickid);
345 $online_user["nick"][] = $this->getNickname($nickid);
362 $ret = $this->getMeta("channelid-to-nickid",
363 $this->encode($chan),
383 $msgid = $this->_requestMsgId($chan);
394 $this->setMeta("channelid-to-msg", $this->encode($chan), $msgid, $data);
399 $this->rmMeta("channelid-to-msg", $this->encode($chan), $old_msgid);
417 $new_from_id = $this->getLastId($chan);
421 $line = $this->getMeta("channelid-to-msg", $this->encode($chan), $mid, true);
450 $lastmsgid = $this->getMeta("channelid-to-msgid", $this->encode($chan), 'lastmsgid', true);
468 $lastmsgid = $this->incMeta("channelid-to-msgid", $this->encode($chan), 'lastmsgid');
483 $this->rmMeta(NULL);
489 $ret = $this->getMeta("nickid-to-metadata", $nickid);
491 $result[$k] = $this->getUserMeta($nickid, $k);
499 $ret = $this->getMeta("nickid-to-metadata", $nickid, $key, true);
505 $ret = $this->setMeta("nickid-to-metadata", $nickid, $key, $value);
511 $ret = $this->getMeta("nickid-to-cmdtoplay", $nickid, $key, true);
517 $ret = $this->setMeta("nickid-to-cmdtoplay", $nickid, $key, $value);
524 $ret = $this->getMeta("channelid-to-metadata", $this->encode($chan));
526 $result[$k] = $this->getChanMeta($chan, $k);
532 $ret = $this->getMeta("channelid-to-metadata", $this->encode($chan), $key, true);
538 $ret = $this->setMeta("channelid-to-metadata", $this->encode($chan), $key, $value);
560 $ret = $this->_container->setMeta($group, $subgroup, $leaf, $leafvalue);
562 if ($this->_usememorycache)
565 if (isset($this->_cache[$group]['value']) &&
566 !in_array($subgroup, $this->_cache[$group]['value']))
568 $this->_cache[$group]['value'][] = $subgroup;
569 $this->_cache[$group]['timestamp'][] = time();
571 if (isset($this->_cache[$group]['childs'][$subgroup]['value']) &&
572 !in_array($leaf, $this->_cache[$group]['childs'][$subgroup]['value']))
574 $this->_cache[$group]['childs'][$subgroup]['value'][] = $leaf;
575 $this->_cache[$group]['childs'][$subgroup]['timestamp'][] = time();
577 $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = array($leafvalue);
578 $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = array(time());
598 if ($this->_usememorycache)
603 isset($this->_cache[$group]['value']))
606 $ret = $this->_cache[$group];
609 isset($this->_cache[$group]['childs'][$subgroup]['value']))
612 $ret = $this->_cache[$group]['childs'][$subgroup];
618 if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value']))
621 $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf];
626 if (isset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp']))
629 $ret = $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf];
644 $ret = $this->_container->getMeta($group, $subgroup, $leaf, $withleafvalue);
646 if ($this->_usememorycache)
651 $this->_cache[$group]['value'] = $ret['value'];
652 $this->_cache[$group]['timestamp'] = $ret['timestamp'];
656 $this->_cache[$group]['childs'][$subgroup]['value'] = $ret['value'];
657 $this->_cache[$group]['childs'][$subgroup]['timestamp'] = $ret['timestamp'];
662 $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = $ret['value'];
664 unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value']);
665 … $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = $ret['timestamp'];
682 $ret = $this->_container->incMeta($group, $subgroup, $leaf);
684 if ($this->_usememorycache)
687 if (isset($this->_cache[$group]['value']) &&
688 !in_array($subgroup, $this->_cache[$group]['value']))
690 $this->_cache[$group]['value'][] = $subgroup;
691 $this->_cache[$group]['timestamp'][] = time();
693 if (isset($this->_cache[$group]['childs'][$subgroup]['value']) &&
694 !in_array($leaf, $this->_cache[$group]['childs'][$subgroup]['value']))
696 $this->_cache[$group]['childs'][$subgroup]['value'][] = $leaf;
697 $this->_cache[$group]['childs'][$subgroup]['timestamp'][] = time();
699 $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['value'] = $ret['value'];
700 $this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]['timestamp'] = array(time());
715 if ($this->_usememorycache)
719 $this->_cache = array();
721 unset($this->_cache[$group]);
724 if (isset($this->_cache[$group]['value']))
726 $i = array_search($subgroup,$this->_cache[$group]['value']);
729 unset($this->_cache[$group]['value'][$i]);
730 unset($this->_cache[$group]['timestamp'][$i]);
733 unset($this->_cache[$group]['childs'][$subgroup]);
737 if (isset($this->_cache[$group]['childs'][$subgroup]['value']))
739 $i = array_search($leaf,$this->_cache[$group]['childs'][$subgroup]['value']);
742 unset($this->_cache[$group]['childs'][$subgroup]['value'][$i]);
743 unset($this->_cache[$group]['childs'][$subgroup]['timestamp'][$i]);
746 unset($this->_cache[$group]['childs'][$subgroup]['childs'][$leaf]);
750 return $this->_container->rmMeta($group, $subgroup, $leaf);
759 return $this->_container->encode($str);
768 return $this->_container->decode($str);