add description of function

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10764 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-06-05 05:33:14 +00:00
parent 5a510567d1
commit ebfe89ca32
10 changed files with 243 additions and 120 deletions

View file

@ -2,7 +2,7 @@
/**
* @class ModuleObject
* @author NHN (developers@xpressengine.com)
* @brief base class of ModuleHandler
* base class of ModuleHandler
**/
class ModuleObject extends Object {
@ -30,16 +30,18 @@
var $module_config = NULL;
/**
* @brief setter to set the name of module
* @param name of module
* setter to set the name of module
* @param string $module name of module
* @return void
**/
function setModule($module) {
$this->module = $module;
}
/**
* @brief setter to set the name of module path
* @param the directory path to a module directory
* setter to set the name of module path
* @param string $path the directory path to a module directory
* @return void
**/
function setModulePath($path) {
if(substr($path,-1)!='/') $path.='/';
@ -47,25 +49,28 @@
}
/**
* @brief setter to set an url for redirection
* @param $url url for redirection
* setter to set an url for redirection
* @param string $url url for redirection
* @remark redirect_url is used only for ajax requests
* @return void
**/
function setRedirectUrl($url='./') {
$this->add('redirect_url', $url);
}
/**
* @brief get url for redirection
* get url for redirection
* @return string redirect_url
**/
function getRedirectUrl(){
return $this->get('redirect_url');
}
/**
* @brief set message
* @param $message a message string
* @param $type type of message (error, info, update)
* set message
* @param string $message a message string
* @param string $type type of message (error, info, update)
* @return void
**/
function setMessage($message, $type = null){
parent::setMessage($message);
@ -73,15 +78,17 @@
}
/**
* @brief set type of message
* @param $type type of message (error, info, update)
* set type of message
* @param string $type type of message (error, info, update)
* @return void
**/
function setMessageType($type){
$this->add('message_type', $type);
}
/**
* @brief get type of message
* get type of message
* @return string $type
**/
function getMessageType(){
$type = $this->get('message_type');
@ -92,9 +99,10 @@
}
/**
* @brief sett to set the template path for refresh.html
* @remark refresh.html is executed as a result of method execution
* sett to set the template path for refresh.html
* refresh.html is executed as a result of method execution
* Tpl as the common run of the refresh.html ..
* @return void
**/
function setRefreshPage() {
$this->setTemplatePath('./common/tpl');
@ -103,16 +111,19 @@
/**
* @brief sett to set the action name
* sett to set the action name
* @param string $act
* @return void
**/
function setAct($act) {
$this->act = $act;
}
/**
* @brief sett to set module information
* @param[in] $module_info object containing module information
* @param[in] $xml_info object containing module description
* sett to set module information
* @param object $module_info object containing module information
* @param object $xml_info object containing module description
* @return void
**/
function setModuleInfo($module_info, $xml_info) {
// The default variable settings
@ -172,8 +183,9 @@
}
/**
* @brief set the stop_proc and approprate message for msg_code
* @param $msg_code an error code
* set the stop_proc and approprate message for msg_code
* @param string $msg_code an error code
* @return ModuleObject $this
**/
function stop($msg_code) {
// flag setting to stop the proc processing
@ -195,7 +207,9 @@
}
/**
* @brief set the file name of the template file
* set the file name of the template file
* @param string name of file
* @return void
**/
function setTemplateFile($filename) {
if(substr($filename,-5)!='.html') $filename .= '.html';
@ -203,14 +217,17 @@
}
/**
* @brief retrieve the directory path of the template directory
* retrieve the directory path of the template directory
* @return string
**/
function getTemplateFile() {
return $this->template_file;
}
/**
* @brief set the directory path of the template directory
* set the directory path of the template directory
* @param string path of template directory.
* @return void
**/
function setTemplatePath($path) {
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
@ -219,15 +236,17 @@
}
/**
* @brief retrieve the directory path of the template directory
* retrieve the directory path of the template directory
* @return string
**/
function getTemplatePath() {
return $this->template_path;
}
/**
* @brief set the file name of the temporarily modified by admin
* set the file name of the temporarily modified by admin
* @param string name of file
* @return void
**/
function setEditedLayoutFile($filename) {
if(substr($filename,-5)!='.html') $filename .= '.html';
@ -235,14 +254,17 @@
}
/**
* @brief retreived the file name of edited_layout_file
* retreived the file name of edited_layout_file
* @return string
**/
function getEditedLayoutFile() {
return $this->edited_layout_file;
}
/**
* @brief set the file name of the layout file
* set the file name of the layout file
* @param string name of file
* @return void
**/
function setLayoutFile($filename) {
if(substr($filename,-5)!='.html') $filename .= '.html';
@ -250,14 +272,16 @@
}
/**
* @brief get the file name of the layout file
* get the file name of the layout file
* @return string
**/
function getLayoutFile() {
return $this->layout_file;
}
/**
* @brief set the directory path of the layout directory
* set the directory path of the layout directory
* @param string path of layout directory.
**/
function setLayoutPath($path) {
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
@ -266,15 +290,16 @@
}
/**
* @brief set the directory path of the layout directory
* set the directory path of the layout directory
* @return string
**/
function getLayoutPath() {
return $this->layout_path;
}
/**
* @brief excute the member method specified by $act variable
*
* excute the member method specified by $act variable
* @return boolean true : success false : fail
**/
function proc() {
// pass if stop_proc is true