add phpDoc comment in trackback module

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10799 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-06-26 06:28:45 +00:00
parent 49c03b2869
commit 663fcaf84b
7 changed files with 270 additions and 176 deletions

View file

@ -1,21 +1,24 @@
<?php <?php
/** /**
* @class trackbackAdminController * trackbackAdminController class
* trackback module admin controller class
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief trackback module admin controller class * @package /modules/trackback
**/ * @version 0.1
*/
class trackbackAdminController extends trackback { class trackbackAdminController extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Trackbacks delete selected in admin page * Trackbacks delete selected in admin page
**/ * @return void|Object
*/
function procTrackbackAdminDeleteChecked() { function procTrackbackAdminDeleteChecked() {
// An error appears if no document is selected // An error appears if no document is selected
$cart = Context::get('cart'); $cart = Context::get('cart');
@ -43,8 +46,9 @@
} }
/** /**
* @brief Save Settings * Save Settings
**/ * @return object
*/
function procTrackbackAdminInsertConfig() { function procTrackbackAdminInsertConfig() {
$config->enable_trackback = Context::get('enable_trackback'); $config->enable_trackback = Context::get('enable_trackback');
if($config->enable_trackback != 'Y') $config->enable_trackback = 'N'; if($config->enable_trackback != 'Y') $config->enable_trackback = 'N';
@ -60,8 +64,9 @@
} }
/** /**
* @brief Trackback Module Settings * Trackback Module Settings
**/ * @return void|Object
*/
function procTrackbackAdminInsertModuleConfig() { function procTrackbackAdminInsertModuleConfig() {
// Get variables // Get variables
$module_srl = Context::get('target_module_srl'); $module_srl = Context::get('target_module_srl');
@ -89,8 +94,9 @@
} }
/** /**
* @brief Trackback Module Settings * Trackback Module Settings
**/ * @return void
*/
function procTrackbackAdminAddCart() function procTrackbackAdminAddCart()
{ {
$trackback_srl = (int)Context::get('trackback_srl'); $trackback_srl = (int)Context::get('trackback_srl');
@ -112,8 +118,11 @@
} }
/** /**
* @brief Trackback modular set function * Trackback modular set function
**/ * @param int $module_srl
* @param string $enable_trackback 'Y' or 'N'
* @return Object
*/
function setTrackbackModuleConfig($module_srl, $enable_trackback) { function setTrackbackModuleConfig($module_srl, $enable_trackback) {
$config->enable_trackback = $enable_trackback; $config->enable_trackback = $enable_trackback;
@ -123,8 +132,10 @@
} }
/** /**
* @brief Modules belonging to remove all trackbacks * Modules belonging to remove all trackbacks
**/ * @param int $module_srl
* @return object
*/
function deleteModuleTrackbacks($module_srl) { function deleteModuleTrackbacks($module_srl) {
// Delete // Delete
$args->module_srl = $module_srl; $args->module_srl = $module_srl;

View file

@ -1,21 +1,25 @@
<?php <?php
/** /**
* @class trackbackAdminModel * @class trackbackAdminModel
* @author NHN (developers@xpressengine.com)
* @brief trackback module admin model class * @brief trackback module admin model class
**/ *
* @author NHN (developers@xpressengine.com)
* @package /modules/trackback
* @version 0.1
*/
class trackbackAdminModel extends trackback { class trackbackAdminModel extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Trackbacks Bringing all the time in reverse order (administrative) * Trackbacks Bringing all the time in reverse order (administrative)
**/ * @param object $obj
* @return object
*/
function getTotalTrackbackList($obj) { function getTotalTrackbackList($obj) {
// Search options // Search options
$search_target = $obj->search_target?$obj->search_target:trim(Context::get('search_target')); $search_target = $obj->search_target?$obj->search_target:trim(Context::get('search_target'));
@ -63,6 +67,12 @@
return $output; return $output;
} }
/**
* Return trackback count by date
* @param strgin $date
* @param array $moduleSrlList
* @return int
*/
function getTrackbackCountByDate($date = '', $moduleSrlList = array()) function getTrackbackCountByDate($date = '', $moduleSrlList = array())
{ {
if($date) $args->regDate = date('Ymd', strtotime($date)); if($date) $args->regDate = date('Ymd', strtotime($date));

View file

@ -1,21 +1,24 @@
<?php <?php
/** /**
* @class trackbackAdminView * trackbackAdminView class
* trackback module admin view class
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief trackback module admin view class * @package /modules/trackback
**/ * @version 0.1
*/
class trackbackAdminView extends trackback { class trackbackAdminView extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Display output list (administrative) * Display output list (administrative)
**/ * @return void
*/
function dispTrackbackAdminList() { function dispTrackbackAdminList() {
// Wanted set // Wanted set
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');

View file

@ -1,15 +1,17 @@
<?php <?php
/** /**
* @class trackback * trackback class
* trackback module's high class
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief trackback module's high class * @package /modules/trackback
**/ * @version 0.1
*/
class trackback extends ModuleObject { class trackback 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() {
// Register action forward (to use in administrator mode) // Register action forward (to use in administrator mode)
$oModuleController = &getController('module'); $oModuleController = &getController('module');
@ -27,8 +29,9 @@
} }
/** /**
* @brief a method to check if successfully installed * A method to check if successfully installed
**/ * @return bool
*/
function checkUpdate() { function checkUpdate() {
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
// 2007. 10. 17 posts deleted, even when the comments will be deleted trigger property // 2007. 10. 17 posts deleted, even when the comments will be deleted trigger property
@ -44,8 +47,9 @@
} }
/** /**
* @brief Execute update * Execute update
**/ * @return Object
*/
function moduleUpdate() { function moduleUpdate() {
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
$oModuleController = &getController('module'); $oModuleController = &getController('module');
@ -66,8 +70,9 @@
} }
/** /**
* @brief Re-generate the cache file * Re-generate the cache file
**/ * @return void
*/
function recompileCache() { function recompileCache() {
} }

View file

@ -1,21 +1,24 @@
<?php <?php
/** /**
* @class trackbackController * trackbackController class
* trackback module's Controller class
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief trackback module's Controller class * @package /modules/trackback
**/ * @version 0.1
*/
class trackbackController extends trackback { class trackbackController extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Trackbacks sent * Trackbacks sent
**/ * @return object
*/
function procTrackbackSend() { function procTrackbackSend() {
// Yeokingeul to post numbers and shipping addresses Wanted // Yeokingeul to post numbers and shipping addresses Wanted
$document_srl = Context::get('target_srl'); $document_srl = Context::get('target_srl');
@ -50,8 +53,9 @@
} }
/** /**
* @brief Trackback List * Trackback List
**/ * @return void
*/
function procTrackbackGetList() function procTrackbackGetList()
{ {
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted'); if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
@ -83,8 +87,9 @@
} }
/** /**
* @brief Trackbacks send documents from the popup menu add a menu * Trackbacks send documents from the popup menu add a menu
**/ * @parma array $menu_list
*/
function triggerSendTrackback(&$menu_list) { function triggerSendTrackback(&$menu_list) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
if(!$logged_info->member_srl) return new Object(); if(!$logged_info->member_srl) return new Object();
@ -103,8 +108,10 @@
} }
/** /**
* @brief delete document in the document to delete the trigger Trackbacks * Delete document in the document to delete the trigger Trackbacks
**/ * @param object $obj
* @return Object
*/
function triggerDeleteDocumentTrackbacks(&$obj) { function triggerDeleteDocumentTrackbacks(&$obj) {
$document_srl = $obj->document_srl; $document_srl = $obj->document_srl;
if(!$document_srl) return new Object(); if(!$document_srl) return new Object();
@ -113,8 +120,10 @@
} }
/** /**
* @brief deletion module that deletes all the trigger yeokingeul * Deletion module that deletes all the trigger yeokingeul
**/ * @param object $obj
* @return Object
*/
function triggerDeleteModuleTrackbacks(&$obj) { function triggerDeleteModuleTrackbacks(&$obj) {
$module_srl = $obj->module_srl; $module_srl = $obj->module_srl;
if(!$module_srl) return new Object(); if(!$module_srl) return new Object();
@ -124,8 +133,9 @@
} }
/** /**
* @brief Trackback inserted * Trackback inserted
**/ * @return Object
*/
function trackback() { function trackback() {
// Output is set to XMLRPC // Output is set to XMLRPC
Context::setRequestMethod("XMLRPC"); Context::setRequestMethod("XMLRPC");
@ -153,6 +163,12 @@
return $this->insertTrackback($obj); return $this->insertTrackback($obj);
} }
/**
* Trackback inserted
* @param object $obj
* @param bool $manual_inserted
* @return Object
*/
function insertTrackback($obj, $manual_inserted = false) { function insertTrackback($obj, $manual_inserted = false) {
// List trackback // List trackback
$obj = Context::convertEncoding($obj); $obj = Context::convertEncoding($obj);
@ -202,8 +218,11 @@
} }
/** /**
* @brief Deleting a single yeokingeul * Deleting a single yeokingeul
**/ * @param int $trackback_srl
* @param bool $is_admin
* @return object
*/
function deleteTrackback($trackback_srl, $is_admin = false) { function deleteTrackback($trackback_srl, $is_admin = false) {
// trackback model object creation // trackback model object creation
$oTrackbackModel = &getModel('trackback'); $oTrackbackModel = &getModel('trackback');
@ -237,8 +256,10 @@
} }
/** /**
* @brief Delete All RSS Trackback * Delete All RSS Trackback
**/ * @param int $document_srl
* @return object
*/
function deleteTrackbacks($document_srl) { function deleteTrackbacks($document_srl) {
// Delete // Delete
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
@ -248,10 +269,13 @@
} }
/** /**
* @brief Trackbacks sent to * Trackbacks sent to
*
* After sending the results are not sticky and handling * After sending the results are not sticky and handling
**/ * @param documentItem $oDocument
* @param string $trackback_url
* @param string $charset
* @return Object
*/
function sendTrackback($oDocument, $trackback_url, $charset) { function sendTrackback($oDocument, $trackback_url, $charset) {
$oModuleController = &getController('module'); $oModuleController = &getController('module');
// Information sent by // Information sent by
@ -321,8 +345,15 @@
} }
/** /**
* @brief Within a specific time of a specific ipaddress Trackbacks delete all * Within a specific time of a specific ipaddress Trackbacks delete all
**/ * @param int $time
* @param string $ipaddress
* @param string $url
* @param string $blog_name
* @param string $title
* @param string $excerpt
* @return void
*/
function deleteTrackbackSender($time, $ipaddress, $url, $blog_name, $title, $excerpt) { function deleteTrackbackSender($time, $ipaddress, $url, $blog_name, $title, $excerpt) {
$obj->regdate = date("YmdHis",time()-$time); $obj->regdate = date("YmdHis",time()-$time);
$obj->ipaddress = $ipaddress; $obj->ipaddress = $ipaddress;

View file

@ -1,21 +1,26 @@
<?php <?php
/** /**
* @class trackbackModel * trackbackModel class
* trackback module model class
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief trackback module model class * @package /modules/trackback
**/ * @version 0.1
*/
class trackbackModel extends trackback { class trackbackModel extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Wanted a trackback information * Wanted a trackback information
**/ * @param int $trackback_srl
* @param array $columnList
* @return object
*/
function getTrackback($trackback_srl, $columnList = array()) { function getTrackback($trackback_srl, $columnList = array()) {
$args->trackback_srl = $trackback_srl; $args->trackback_srl = $trackback_srl;
$output = executeQuery('trackback.getTrackback', $args, $columnList); $output = executeQuery('trackback.getTrackback', $args, $columnList);
@ -23,8 +28,10 @@
} }
/** /**
* @brief Trackbacks document_srl corresponding to the bringing of the total number of * Trackbacks document_srl corresponding to the bringing of the total number of
**/ * @param int $document_srl
* @return int
*/
function getTrackbackCount($document_srl) { function getTrackbackCount($document_srl) {
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
$output = executeQuery('trackback.getTrackbackCount', $args); $output = executeQuery('trackback.getTrackbackCount', $args);
@ -35,8 +42,10 @@
/** /**
* @brief Trackbacks module_srl corresponding to the bringing of the total number of * Trackbacks module_srl corresponding to the bringing of the total number of
**/ * @param int $module_srl
* @return int
*/
function getTrackbackAllCount($module_srl) { function getTrackbackAllCount($module_srl) {
$args->module_srl = $module_srl; $args->module_srl = $module_srl;
$output = executeQuery('trackback.getTrackbackCount', $args); $output = executeQuery('trackback.getTrackbackCount', $args);
@ -47,9 +56,12 @@
/** /**
* @brief For a particular document to a specific ip number of trackbacks recorded * For a particular document to a specific ip number of trackbacks recorded
* Im spamfilter method used in * Im spamfilter method used in
**/ * @param int $document_srl
* @param string $ipaddress
* @return int
*/
function getTrackbackCountByIPAddress($document_srl, $ipaddress) { function getTrackbackCountByIPAddress($document_srl, $ipaddress) {
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
$args->ipaddress = $ipaddress; $args->ipaddress = $ipaddress;
@ -60,8 +72,10 @@
} }
/** /**
* @brief Trackbacks certain documents belonging to the bringing of the list * Trackbacks certain documents belonging to the bringing of the list
**/ * @param int $document_srl
* @return array
*/
function getTrackbackList($document_srl) { function getTrackbackList($document_srl) {
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
$args->list_order = 'list_order'; $args->list_order = 'list_order';
@ -77,8 +91,10 @@
} }
/** /**
* @brief Bringing a mid Trackbacks * Bringing a mid Trackbacks
**/ * @param object $obj
* @return object
*/
function getNewestTrackbackList($obj) { function getNewestTrackbackList($obj) {
if($obj->mid) { if($obj->mid) {
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
@ -99,8 +115,10 @@
} }
/** /**
* @brief Return to a specific set of modules trackback * Return to a specific set of modules trackback
**/ * @param int $module_srl
* @return object
*/
function getTrackbackModuleConfig($module_srl) { function getTrackbackModuleConfig($module_srl) {
// Bringing trackback module config // Bringing trackback module config
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
@ -114,8 +132,15 @@
} }
/** /**
* @brief Fixed in time for the entire yeokingeul Wanted to Register * Fixed in time for the entire yeokingeul Wanted to Register
**/ * @param int $time
* @param string $ipaddress
* @param string $url
* @param string $blog_name
* @param string $title
* @param string excerpt
* @return int
*/
function getRegistedTrackback($time, $ipaddress, $url, $blog_name, $title, $excerpt) { function getRegistedTrackback($time, $ipaddress, $url, $blog_name, $title, $excerpt) {
$obj->regdate = date("YmdHis",time()-$time); $obj->regdate = date("YmdHis",time()-$time);
$obj->ipaddress = $ipaddress; $obj->ipaddress = $ipaddress;
@ -128,19 +153,23 @@
} }
/** /**
* @brief return by creating a trackback url * Return by creating a trackback url
* Adds the key value in the trackback url. * Adds the key value in the trackback url.
**/ * @param int $document_srl
* @return string
*/
function getTrackbackUrl($document_srl) { function getTrackbackUrl($document_srl) {
$url = getFullUrl('','document_srl',$document_srl,'act','trackback','key',$this->getTrackbackKey($document_srl)); $url = getFullUrl('','document_srl',$document_srl,'act','trackback','key',$this->getTrackbackKey($document_srl));
return $url; return $url;
} }
/** /**
* @brief Return keys by generating * Return keys by generating
* db key value information, plus a 10 minute off-duty time together and hash values and deal with the results * db key value information, plus a 10 minute off-duty time together and hash values and deal with the results
* So was extended only url, 1, 10, 20-digit combination of letters only, one return * So was extended only url, 1, 10, 20-digit combination of letters only, one return
**/ * @param int $document_srl
* @return string
*/
function getTrackbackKey($document_srl) { function getTrackbackKey($document_srl) {
$time = (int) (time()/(60*10)); $time = (int) (time()/(60*10));
$db_info = Context::getDBInfo(); $db_info = Context::getDBInfo();

View file

@ -1,21 +1,24 @@
<?php <?php
/** /**
* @class trackbackView * @class trackbackView
* @author NHN (developers@xpressengine.com)
* @brief trackback module's view class * @brief trackback module's view class
**/ *
* @author NHN (developers@xpressengine.com)
* @package /modules/trackback
* @version 0.1
*/
class trackbackView extends trackback { class trackbackView extends trackback {
/** /**
* @brief Initialization * Initialization
**/ * @return void
*/
function init() { function init() {
} }
/** /**
* @brief Display output list (administrative) * Display output list (administrative)
**/ * @return void
*/
function dispTrackbackSend() { function dispTrackbackSend() {
$document_srl = Context::get('document_srl'); $document_srl = Context::get('document_srl');
if(!$document_srl) return $this->stop('msg_invalid_request'); if(!$document_srl) return $this->stop('msg_invalid_request');
@ -38,9 +41,11 @@
} }
/** /**
* @brief An additional set of parts for a service module * An additional set of parts for a service module
* Use the form out of the settings for trackback * Use the form out of the settings for trackback
**/ * @param string $obj
* @return Object
*/
function triggerDispTrackbackAdditionSetup(&$obj) { function triggerDispTrackbackAdditionSetup(&$obj) {
$current_module_srl = Context::get('module_srl'); $current_module_srl = Context::get('module_srl');
$current_module_srls = Context::get('module_srls'); $current_module_srls = Context::get('module_srls');