77 static $instance = array();
80 $instance[
$dirname] =
new $class($dirname);
94 if ($this->
object == null) {
97 if (!is_object($this->
object)) {
98 $this->
addLog(
"ERROR :: Module '{$this->dirname}' does not exist");
114 if ($this->configs == null) {
118 $this->
addLog(
"Getting all config");
123 if (!isset($this->configs[
$name])) {
124 $this->
addLog(
"ERROR :: Config '{$name}' does not exist");
130 $this->
addLog(
"Getting config '{$name}' : " . $this->configs[$name]);
132 return $this->configs[
$name];
146 if (!isset($this->_handlers[
$name])) {
150 if (!isset($this->_handlers[$name])) {
151 $this->
addLog(
"ERROR :: Handler '{$name}' does not exist");
153 $this->
addLog(
"Getting handler '{$name}'");
154 $ret = $this->_handlers[
$name];
168 if (isset($xoopsModule) && is_object($xoopsModule)
177 $this->
addLog(
'INIT MODULE OBJECT');
187 $this->
addLog(
'INIT CONFIG');
189 if (isset($xoopsModule) && is_object($xoopsModule)
214 if (!isset($this->_handlers[
$name])) {
216 "/modules/{$this->dirname}/class/{$name}.php";
217 if (file_exists($hnd_file)) {
218 include_once $hnd_file;
220 $class = ucfirst(strtolower($this->dirname))
221 . ucfirst(strtolower($name)) .
'Handler';
222 if (class_exists($class)) {
224 $this->_handlers[
$name] =
new $class($db);
225 $this->
addLog(
"Loading class '{$class}'");
227 $this->
addLog(
"ERROR :: Class '{$class}' could not be loaded");
242 $this->
addLog(
"Loading language '{$name}'");
244 $this->
addLog(
"ERROR :: Language '{$name}' could not be loaded");
259 $this->debug = (bool) $bool;
272 if (!is_scalar($log)) {
273 $log = serialize($log);
289 if (
$GLOBALS[
'xoopsModule']->getVar(
'dirname') == $this->dirname) {
315 return \XoopsBaseConfig::get(
'url') .
'/modules/' . $this->dirname .
'/' .
$url;
327 return \XoopsBaseConfig::get(
'root-path') .
'/modules/' . $this->dirname .
'/' .
$path;
static getInstance($dirname= 'notsetyet')
xoops_getHandler($name, $optional=false)
if($_SERVER['REQUEST_METHOD']== 'POST') $config_handler
static getConnection($options=null)
static load($name, $domain= '', $language=null)
redirect($url, $time=3, $message= '')
redirect_header($url, $time=3, $message= '', $addredirect=true, $allowExternalLink=false)