47 if(substr_compare($path,
'/', -1) !== 0)
51 $this->module_path = $path;
65 $this->
add(
'redirect_url', $url);
80 return $this->
get(
'redirect_url');
102 $this->
add(
'message_type', $type);
111 $type = $this->
get(
'message_type');
112 $typeList = array(
'error' => 1,
'info' => 1,
'update' => 1);
113 if(!isset($typeList[$type]))
115 $type = $this->
getError() ?
'error' :
'info';
176 if(substr_count($this->act,
'Member') || substr_count($this->act,
'Communication'))
187 $permission_target =
$xml_info->permission->{$this->act};
189 if(!$permission_target && substr_count($this->act,
'Admin'))
191 $permission_target =
'manager';
194 switch($permission_target)
198 $this->
stop(
'msg_is_not_administrator');
203 $this->
stop(
'msg_not_permitted_act');
210 $this->grant = $grant;
216 if(method_exists($this,
'init'))
230 $this->stop_proc = TRUE;
233 $this->setMessage($msg_code);
237 $oMessageObject->setError(-1);
238 $oMessageObject->setMessage($msg_code);
239 $oMessageObject->dispMessage();
241 $this->setTemplatePath($oMessageObject->getTemplatePath());
242 $this->setTemplateFile($oMessageObject->getTemplateFile());
254 if(isset($filename) && substr_compare($filename,
'.html', -5) !== 0)
256 $filename .=
'.html';
258 $this->template_file = $filename;
267 return $this->template_file;
279 if((strlen($path) >= 1 && substr_compare($path,
'/', 0, 1) !== 0) && (strlen($path) >= 2 && substr_compare($path,
'./', 0, 2) !== 0))
281 $path =
'./' . $path;
284 if(substr_compare($path,
'/', -1) !== 0)
288 $this->template_path = $path;
297 return $this->template_path;
307 if(!$filename)
return;
309 if(substr_compare($filename,
'.html', -5) !== 0)
311 $filename .=
'.html';
313 $this->edited_layout_file = $filename;
322 return $this->edited_layout_file;
332 if(!$filename)
return;
334 if(substr_compare($filename,
'.html', -5) !== 0)
336 $filename .=
'.html';
338 $this->layout_file = $filename;
347 return $this->layout_file;
358 if((strlen($path) >= 1 && substr_compare($path,
'/', 0, 1) !== 0) && (strlen($path) >= 2 && substr_compare($path,
'./', 0, 2) !== 0))
360 $path =
'./' . $path;
362 if(substr_compare($path,
'/', -1) !== 0)
366 $this->layout_path = $path;
375 return $this->layout_path;
393 if(!$triggerOutput->toBool())
395 $this->setError($triggerOutput->getError());
396 $this->setMessage($triggerOutput->getMessage());
401 $called_position =
'before_module_proc';
406 if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act))
409 if($this->
module_srl && !$this->grant->access)
411 $this->stop(
"msg_not_permitted_act");
417 $usedSkinModule = !($this->
module ==
'page' && ($this->module_info->page_type ==
'OUTSIDE' || $this->module_info->page_type ==
'WIDGET'));
418 if($usedSkinModule && $is_default_skin && $this->
module !=
'admin' && strpos($this->act,
'Admin') ===
false && $this->
module == $this->module_info->module)
425 if($this->
module ==
'page')
427 $this->module_info->{$valueName} = $skinName;
431 $isTemplatPath = (strpos($this->getTemplatePath(),
'/tpl/') !== FALSE);
434 $this->setTemplatePath(sprintf(
'%s%s/%s/', $this->module_path, $dir, $skinName));
443 $output = $this->{$this->act}();
452 if(!$triggerOutput->toBool())
454 $this->setError($triggerOutput->getError());
455 $this->setMessage($triggerOutput->getMessage());
460 $called_position =
'after_module_proc';
465 if(is_a(
$output,
'BaseObject') || is_subclass_of(
$output,
'BaseObject'))
467 $this->setError(
$output->getError());
468 $this->setMessage(
$output->getMessage());
476 if($this->module_info->module_type ==
'view' || $this->module_info->module_type ==
'mobile')
480 $oAPI =
getAPI($this->module_info->module,
'api');
481 if(method_exists($oAPI, $this->act))
483 $oAPI->{$this->act}($this);
setTemplateFile($filename)
setMessage($message= 'success', $type=NULL)
& getModuleInstance($module, $type= 'view', $kind= '')
getController($module_name)
$template_path
a path of directory where template files reside
debugPrint($debug_output=NULL, $display_option=TRUE, $file= '_debug_message.php')
$act
a string value to contain the action name
set($key, $val, $set_to_get_vars=0)
getLayoutPath($layout_name="", $layout_type="P")
high class of message module
$template_file
name of template file
$stop_proc
a flag to indicating whether to stop the execution of code.
$xml_info
an object containing the module description extracted from XML file
$module_path
a path to directory where module source code resides
$module_srl
integer value to represent a run-time instance of Module (XE Module)
$edited_layout_file
name of temporary layout files that is modified in an admin mode
setModuleInfo($module_info, $xml_info)
$module_info
an object containing the module information
$layout_path
a path of directory where layout files reside
$mid
string to represent run-time instance of Module (XE Module)
setRedirectUrl($url= './', $output=NULL)
$module
Class name of Xe Module that is identified by mid.
setEditedLayoutFile($filename)
triggerCall($trigger_name, $called_position, &$obj)
$layout_file
name of layout file
high class of the module module