Пример #1
0
 public function getConfGlob($key, $def)
 {
     return Dog_Conf_Plug::getConf($this->name, $key, $def);
 }
Пример #2
0
 public function getValue()
 {
     $key = $this->name;
     $def = $this->default;
     $sid = Dog::getServer()->getID();
     $c = Dog::getChannel();
     if ($this->module !== NULL) {
         $mod = $this->module;
         switch ($this->scope) {
             case 'g':
                 return Dog_Conf_Mod::getConf($mod, $key, $def);
             case 's':
                 return Dog_Conf_Mod_Serv::getConf($mod, $sid, $key, $def);
             case 'c':
                 return $c === false ? $def : Dog_Conf_Mod_Chan::getConf($mod, $c->getID(), $key, $def);
             case 'u':
                 return Dog_Conf_Mod_User::getConf($mod, Dog::getUID(), $key, $def);
         }
     } elseif ($this->plugin !== NULL) {
         $plg = $this->plugin;
         switch ($this->scope) {
             case 'g':
                 return Dog_Conf_Plug::getConf($plg, $key, $def);
             case 's':
                 return Dog_Conf_Plug_Serv::getConf($plg, $sid, $key, $def);
             case 'c':
                 return $c === false ? $def : Dog_Conf_Plug_Chan::getConf($plg, $c->getID(), $key, $def);
             case 'u':
                 return Dog_Conf_Plug_User::getConf($plg, Dog::getUID(), $key, $def);
         }
     }
     return $def;
 }