47 $this->_dirname = strtolower(
$dirname);
55 $this->_debug = (bool)$debug;
63 static $instance =
false;
64 $id = $className = get_called_class();
65 if ($className ==
'Xoops\Module\Helper\Dummy') {
68 if (!isset($instance[
$id])) {
70 $class =
new $className();
72 $instance[
$id] = $class;
74 return $instance[
$id];
82 if ($this->_module == null) {
90 return \Xoops::getInstance();
113 $result = $this->
xoops()->getModuleConfigs($this->_dirname);
114 $this->
_addLog(
"Getting configs for {$this->_dirname} module");
126 $this->
_addLog(
"Getting handler '{$name}'");
127 return $this->
xoops()->getModuleHandler(
$name, $this->_dirname);
132 $this->
xoops()->appendConfig(
'module_cache', array($this->
getModule()->getVar(
'mid') => 0),
true, $this->_dirname);
133 $this->
_addLog(
"Disabling module cache");
157 return $this->
xoops()->user->isAdmin($this->
getModule()->getVar(
'mid'));
171 return $this->
xoops()->url(
'modules/' . $this->_dirname .
'/' .
$url);
183 return $this->
xoops()->path(
'modules/' . $this->_dirname .
'/' .
$path);
200 public function redirect(
$url, $time = 3, $message =
'', $addredirect =
true, $allowExternalLink =
false)
202 $this->
xoops()->redirect($this->
url(
$url), $time, $message, $addredirect, $allowExternalLink);
213 $this->
_addLog(
"Loading language '{$language}'");
218 $this->
xoops()->loadLocale($this->_dirname);
219 $this->
_addLog(
"Loading locale");
231 $this->
_addLog(
"Loading form '{$name}'");
232 return $this->
xoops()->getModuleForm($obj,
$name, $this->_dirname);
241 $this->_module = $this->
xoops()->module;
243 $this->_module = $this->
xoops()->getModuleByDirname($this->_dirname);
246 $this->_module = $this->
xoops()->getHandlerModule()->create();
248 $this->
_addLog(
'Loading module');
257 $this->
xoops()->preload()->triggerEvent(
'core.module.addlog', array(
redirect($url, $time=3, $message= '', $addredirect=true, $allowExternalLink=false)