From ebfe89ca3210c0bd371955e8468f03f11e481692 Mon Sep 17 00:00:00 2001 From: chschy Date: Tue, 5 Jun 2012 05:33:14 +0000 Subject: [PATCH] add description of function git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10764 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/display/DisplayHandler.class.php | 31 ++++--- classes/display/HTMLDisplayHandler.php | 43 +++++++-- classes/display/JSONDisplayHandler.php | 5 ++ classes/display/VirtualXMLDisplayHandler.php | 5 +- classes/display/XMLDisplayHandler.php | 10 ++- classes/editor/EditorHandler.class.php | 4 +- classes/module/ModuleHandler.class.php | 65 +++++++++----- classes/module/ModuleObject.class.php | 95 ++++++++++++-------- classes/page/PageHandler.class.php | 22 +++-- classes/template/TemplateHandler.class.php | 83 +++++++++++------ 10 files changed, 243 insertions(+), 120 deletions(-) diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index 0327211b9..c1145e1d0 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -2,7 +2,7 @@ /** * @class DisplayHandler * @author NHN (developers@xpressengine.com) - * @brief DisplayHandler is responsible for displaying the execution result. \n + * DisplayHandler is responsible for displaying the execution result. \n * Depending on the request type, it can display either HTML or XML content.\n * Xml content is simple xml presentation of variables in oModule while html content * is the combination of the variables of oModue and template files/. @@ -16,11 +16,11 @@ var $handler = null; /** - * @brief print either html or xml content given oModule object - * @remark addon execution and the trigger execution are included within this method, which - * might create inflexibility for the fine grained caching - * @param[in] $oModule the module object - **/ + * print either html or xml content given oModule object + * @remark addon execution and the trigger execution are included within this method, which might create inflexibility for the fine grained caching + * @param ModuleObject $oModule the module object + * @return void + **/ function printContent(&$oModule) { // Check if the gzip encoding supported if( @@ -82,9 +82,10 @@ /** - * @brief Print debugging message to designated output source depending on the value set to __DEBUG_OUTPUT_. \n - * This method only functions when __DEBUG__ variable is set to 1. - * __DEBUG_OUTPUT__ == 0, messages are written in ./files/_debug_message.php + * Print debugging message to designated output source depending on the value set to __DEBUG_OUTPUT_. \n + * This method only functions when __DEBUG__ variable is set to 1. + * __DEBUG_OUTPUT__ == 0, messages are written in ./files/_debug_message.php + * @return void **/ function _debugOutput() { if(!__DEBUG__) return; @@ -221,7 +222,8 @@ } /** - * @brief print a HTTP HEADER for XML, which is encoded in UTF-8 + * print a HTTP HEADER for XML, which is encoded in UTF-8 + * @return void **/ function _printXMLHeader() { header("Content-Type: text/xml; charset=UTF-8"); @@ -234,7 +236,8 @@ /** - * @brief print a HTTP HEADER for HTML, which is encoded in UTF-8 + * print a HTTP HEADER for HTML, which is encoded in UTF-8 + * @return void **/ function _printHTMLHeader() { header("Content-Type: text/html; charset=UTF-8"); @@ -247,7 +250,8 @@ /** - * @brief print a HTTP HEADER for JSON, which is encoded in UTF-8 + * print a HTTP HEADER for JSON, which is encoded in UTF-8 + * @return void **/ function _printJSONHeader() { header("Content-Type: text/html; charset=UTF-8"); @@ -260,7 +264,8 @@ /** - * @brief print a HTTP HEADER for HTML, which is encoded in UTF-8 + * print a HTTP HEADER for HTML, which is encoded in UTF-8 + * @return void **/ function _printHttpStatusCode($code) { $statusMessage = Context::get('http_status_message'); diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php index 8670948ad..4a8926bee 100644 --- a/classes/display/HTMLDisplayHandler.php +++ b/classes/display/HTMLDisplayHandler.php @@ -2,8 +2,9 @@ class HTMLDisplayHandler { /** - * @brief Produce HTML compliant content given a module object.\n - * @param[in] $oModule the module object + * Produce HTML compliant content given a module object.\n + * @param ModuleObject $oModule the module object + * @return string compiled template string **/ function toDoc(&$oModule) { @@ -79,6 +80,11 @@ class HTMLDisplayHandler { return $output; } + /** + * when display mode is HTML, prepare code before print. + * @param string $output compiled template string + * @return void + **/ function prepareToPrint(&$output) { if(Context::getResponseMethod() != 'HTML') return; @@ -151,6 +157,11 @@ class HTMLDisplayHandler { $oModuleController->replaceDefinedLangCode($output); } + /** + * when display mode is HTML, prepare code before print about tag value. + * @param array $match input value. + * @return string input value. + **/ function _preserveValue($match) { $INPUT_ERROR = Context::get('INPUT_ERROR'); @@ -181,6 +192,11 @@ class HTMLDisplayHandler { return $str.' />'; } + /** + * when display mode is HTML, prepare code before print about '; } + /** + * when display mode is HTML, prepare code before print about