added comments for phpDoc

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10756 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-05-31 02:14:09 +00:00
parent e010c07440
commit 3c609ae06a
4 changed files with 86 additions and 33 deletions

View file

@ -1,14 +1,16 @@
<?php <?php
/** /**
* @class counterAdminView * Admin view class of counter module
* @author NHN (developers@xpressengine.com) *
* @brief Admin view class of counter module * @author NHN (developers@xpressengine.com)
**/ **/
class counterAdminView extends counter { class counterAdminView extends counter {
/** /**
* @brief Initialization * Initialization
*
* @return void
**/ **/
function init() { function init() {
// set the template path // set the template path
@ -16,7 +18,9 @@
} }
/** /**
* @brief Admin page * Admin page
*
* @return Object
**/ **/
function dispCounterAdminIndex() { function dispCounterAdminIndex() {
// set today's if no date is given // set today's if no date is given

View file

@ -1,14 +1,15 @@
<?php <?php
/** /**
* @class counter * High class of counter module
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief high class of counter module
**/ **/
class counter extends ModuleObject { class counter extends ModuleObject {
/** /**
* @brief Implement if additional tasks are necessary when installing * Implement if additional tasks are necessary when installing
* @return Object
**/ **/
function moduleInstall() { function moduleInstall() {
$oCounterController = &getController('counter'); $oCounterController = &getController('counter');
@ -21,7 +22,9 @@
} }
/** /**
* @brief method if successfully installed * method if successfully installed
*
* @return bool
**/ **/
function checkUpdate() { function checkUpdate() {
// Add site_srl to the counter // Add site_srl to the counter
@ -33,7 +36,9 @@
} }
/** /**
* @brief Update * Module update
*
* @return Object
**/ **/
function moduleUpdate() { function moduleUpdate() {
// Add site_srl to the counter // Add site_srl to the counter
@ -45,7 +50,9 @@
} }
/** /**
* @brief re-generate the cache file * re-generate the cache file
*
* @return Object
**/ **/
function recompileCache() { function recompileCache() {
} }

View file

@ -1,27 +1,33 @@
<?php <?php
/** /**
* @class counterController * Counter module's controller class
* @author NHN (developers@xpressengine.com) *
* @brief counter module's controller class * @author NHN (developers@xpressengine.com)
**/ **/
class counterController extends counter { class counterController extends counter {
/** /**
* @brief Initialization * Initialization
*
* @return void
**/ **/
function init() { function init() {
} }
/** /**
* @brief Counter logs * Counter logs.
* @deprecated, if want use below function, you can use 'counterExecute' function instead this function * If want use below function, you can use 'counterExecute' function instead this function
*
* @return void
**/ **/
function procCounterExecute() { function procCounterExecute() {
} }
/** /**
* @brief Counter logs * Counter logs
*
* @return void
**/ **/
function counterExecute() { function counterExecute() {
$oDB = &DB::getInstance(); $oDB = &DB::getInstance();
@ -52,7 +58,10 @@
} }
/** /**
* @brief Leave logs * Leave logs
*
* @param integer $site_srl
* @return Object result of count query
**/ **/
function insertLog($site_srl=0) { function insertLog($site_srl=0) {
$args->regdate = date("YmdHis"); $args->regdate = date("YmdHis");
@ -62,7 +71,10 @@
} }
/** /**
* @brief Register the unique visitor * Register the unique visitor
*
* @param integer $site_srl
* @return void
**/ **/
function insertUniqueVisitor($site_srl=0) { function insertUniqueVisitor($site_srl=0) {
if($site_srl) { if($site_srl) {
@ -80,7 +92,10 @@
} }
/** /**
* @brief Register pageview * Register pageview
*
* @param integer $site_srl
* @return void
**/ **/
function insertPageView($site_srl=0) { function insertPageView($site_srl=0) {
if($site_srl) { if($site_srl) {
@ -98,7 +113,10 @@
} }
/** /**
* @brief Add the total counter status * Add the total counter status
*
* @param integer $site_srl
* @return void
**/ **/
function insertTotalStatus($site_srl=0) { function insertTotalStatus($site_srl=0) {
$args->regdate = 0; $args->regdate = 0;
@ -111,7 +129,11 @@
} }
/** /**
* @brief Add today's counter status * Add today's counter status
*
* @param integer $regdate date(YYYYMMDD) type
* @param integer $site_srl
* @return void
**/ **/
function insertTodayStatus($regdate = 0, $site_srl=0) { function insertTodayStatus($regdate = 0, $site_srl=0) {
if($regdate) $args->regdate = $regdate; if($regdate) $args->regdate = $regdate;
@ -134,7 +156,10 @@
} }
/** /**
* @brief Delete counter logs of the specific virtual site * Delete counter logs of the specific virtual site
*
* @param integer $site_srl
* @return void
**/ **/
function deleteSiteCounterLogs($site_srl) { function deleteSiteCounterLogs($site_srl) {
$args->site_srl = $site_srl; $args->site_srl = $site_srl;

View file

@ -1,20 +1,25 @@
<?php <?php
/** /**
* @class counterModel * Model class of counter module
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief Model class of counter module
**/ **/
class counterModel extends counter { class counterModel extends counter {
/** /**
* @brief Initialization * Initialization
*
* @return void
**/ **/
function init() { function init() {
} }
/** /**
* @brief Verify logs * Verify logs
*
* @param integer $site_srl Site_srl
* @return bool
**/ **/
function isLogged($site_srl=0) { function isLogged($site_srl=0) {
$args->regdate = date("Ymd"); $args->regdate = date("Ymd");
@ -25,7 +30,10 @@
} }
/** /**
* @brief Check if a row of today's counter status exists * Check if a row of today's counter status exists
*
* @param integer $site_srl Site_srl
* @return bool
**/ **/
function isInsertedTodayStatus($site_srl=0) { function isInsertedTodayStatus($site_srl=0) {
$args->regdate = date("Ymd"); $args->regdate = date("Ymd");
@ -39,16 +47,20 @@
} }
/** /**
* @brief Get access statistics for a given date * Get access statistics for a given date
*
* @param mixed $selected_date Date(YYYYMMDD) list
* @param integer $site_srl Site_srl
* @return Object
**/ **/
function getStatus($selected_date, $site_srl=0) { function getStatus($selected_date, $site_srl = 0) {
// If more than one date logs are selected // If more than one date logs are selected
if(is_array($selected_date)) { if(is_array($selected_date)) {
$date_count = count($selected_date); $date_count = count($selected_date);
$args->regdate = implode(',',$selected_date); $args->regdate = implode(',',$selected_date);
// If a single date log is selected // If a single date log is selected
} else { } else {
if(strlen($selected_date)==8) $selected_date = $selected_date; if(strlen($selected_date) == 8) $selected_date = $selected_date;
$args->regdate = $selected_date; $args->regdate = $selected_date;
} }
@ -72,7 +84,12 @@
} }
/** /**
* @brief Select hourly logs of a given date * Select hourly logs of a given date
*
* @param string $type Choice time interval (year, week, month, hour or DEFAULT)
* @param integer $selected_date Date(YYYYMMDD)
* @param integer $site_srl Site_srl
* @return Object
**/ **/
function getHourlyStatus($type='hour', $selected_date, $site_srl=0) { function getHourlyStatus($type='hour', $selected_date, $site_srl=0) {
$max = 0; $max = 0;