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
/**
* @class trackbackAdminController
* @author NHN (developers@xpressengine.com)
* @brief trackback module admin controller class
**/
/**
* trackbackAdminController class
* trackback module admin controller class
*
* @author NHN (developers@xpressengine.com)
* @package /modules/trackback
* @version 0.1
*/
class trackbackAdminController extends trackback {
/**
* @brief Initialization
**/
/**
* Initialization
* @return void
*/
function init() {
}
/**
* @brief Trackbacks delete selected in admin page
**/
/**
* Trackbacks delete selected in admin page
* @return void|Object
*/
function procTrackbackAdminDeleteChecked() {
// An error appears if no document is selected
$cart = Context::get('cart');
@ -42,9 +45,10 @@
}
}
/**
* @brief Save Settings
**/
/**
* Save Settings
* @return object
*/
function procTrackbackAdminInsertConfig() {
$config->enable_trackback = Context::get('enable_trackback');
if($config->enable_trackback != 'Y') $config->enable_trackback = 'N';
@ -59,9 +63,10 @@
return $output;
}
/**
* @brief Trackback Module Settings
**/
/**
* Trackback Module Settings
* @return void|Object
*/
function procTrackbackAdminInsertModuleConfig() {
// Get variables
$module_srl = Context::get('target_module_srl');
@ -88,9 +93,10 @@
}
}
/**
* @brief Trackback Module Settings
**/
/**
* Trackback Module Settings
* @return void
*/
function procTrackbackAdminAddCart()
{
$trackback_srl = (int)Context::get('trackback_srl');
@ -111,9 +117,12 @@
}
}
/**
* @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) {
$config->enable_trackback = $enable_trackback;
@ -122,9 +131,11 @@
return new Object();
}
/**
* @brief Modules belonging to remove all trackbacks
**/
/**
* Modules belonging to remove all trackbacks
* @param int $module_srl
* @return object
*/
function deleteModuleTrackbacks($module_srl) {
// Delete
$args->module_srl = $module_srl;

View file

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

View file

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

View file

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

View file

@ -1,21 +1,24 @@
<?php
/**
* @class trackbackController
* @author NHN (developers@xpressengine.com)
* @brief trackback module's Controller class
**/
/**
* trackbackController class
* trackback module's Controller class
*
* @author NHN (developers@xpressengine.com)
* @package /modules/trackback
* @version 0.1
*/
class trackbackController extends trackback {
/**
* @brief Initialization
**/
/**
* Initialization
* @return void
*/
function init() {
}
/**
* @brief Trackbacks sent
**/
/**
* Trackbacks sent
* @return object
*/
function procTrackbackSend() {
// Yeokingeul to post numbers and shipping addresses Wanted
$document_srl = Context::get('target_srl');
@ -49,9 +52,10 @@
return $output;
}
/**
* @brief Trackback List
**/
/**
* Trackback List
* @return void
*/
function procTrackbackGetList()
{
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
@ -82,9 +86,10 @@
$this->add('trackback_list', $trackbackList);
}
/**
* @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) {
$logged_info = Context::get('logged_info');
if(!$logged_info->member_srl) return new Object();
@ -102,9 +107,11 @@
return new Object();
}
/**
* @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) {
$document_srl = $obj->document_srl;
if(!$document_srl) return new Object();
@ -112,9 +119,11 @@
return $this->deleteTrackbacks($document_srl, true);
}
/**
* @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) {
$module_srl = $obj->module_srl;
if(!$module_srl) return new Object();
@ -123,9 +132,10 @@
return $oTrackbackController->deleteModuleTrackbacks($module_srl);
}
/**
* @brief Trackback inserted
**/
/**
* Trackback inserted
* @return Object
*/
function trackback() {
// Output is set to XMLRPC
Context::setRequestMethod("XMLRPC");
@ -153,6 +163,12 @@
return $this->insertTrackback($obj);
}
/**
* Trackback inserted
* @param object $obj
* @param bool $manual_inserted
* @return Object
*/
function insertTrackback($obj, $manual_inserted = false) {
// List trackback
$obj = Context::convertEncoding($obj);
@ -201,9 +217,12 @@
return new Object();
}
/**
* @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) {
// trackback model object creation
$oTrackbackModel = &getModel('trackback');
@ -236,9 +255,11 @@
return $output;
}
/**
* @brief Delete All RSS Trackback
**/
/**
* Delete All RSS Trackback
* @param int $document_srl
* @return object
*/
function deleteTrackbacks($document_srl) {
// Delete
$args->document_srl = $document_srl;
@ -247,11 +268,14 @@
return $output;
}
/**
* @brief Trackbacks sent to
*
* After sending the results are not sticky and handling
**/
/**
* Trackbacks sent to
* 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) {
$oModuleController = &getController('module');
// Information sent by
@ -320,9 +344,16 @@
return new Object(-1, 'msg_trackback_send_failed');
}
/**
* @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) {
$obj->regdate = date("YmdHis",time()-$time);
$obj->ipaddress = $ipaddress;

View file

@ -1,30 +1,37 @@
<?php
/**
* @class trackbackModel
* @author NHN (developers@xpressengine.com)
* @brief trackback module model class
**/
/**
* trackbackModel class
* trackback module model class
*
* @author NHN (developers@xpressengine.com)
* @package /modules/trackback
* @version 0.1
*/
class trackbackModel extends trackback {
/**
* @brief Initialization
**/
/**
* Initialization
* @return void
*/
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()) {
$args->trackback_srl = $trackback_srl;
$output = executeQuery('trackback.getTrackback', $args, $columnList);
return $output;
}
/**
* @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) {
$args->document_srl = $document_srl;
$output = executeQuery('trackback.getTrackbackCount', $args);
@ -34,9 +41,11 @@
}
/**
* @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) {
$args->module_srl = $module_srl;
$output = executeQuery('trackback.getTrackbackCount', $args);
@ -46,10 +55,13 @@
}
/**
* @brief For a particular document to a specific ip number of trackbacks recorded
* Im spamfilter method used in
**/
/**
* For a particular document to a specific ip number of trackbacks recorded
* Im spamfilter method used in
* @param int $document_srl
* @param string $ipaddress
* @return int
*/
function getTrackbackCountByIPAddress($document_srl, $ipaddress) {
$args->document_srl = $document_srl;
$args->ipaddress = $ipaddress;
@ -59,9 +71,11 @@
return (int)$total_count;
}
/**
* @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) {
$args->document_srl = $document_srl;
$args->list_order = 'list_order';
@ -76,9 +90,11 @@
return $trackback_list;
}
/**
* @brief Bringing a mid Trackbacks
**/
/**
* Bringing a mid Trackbacks
* @param object $obj
* @return object
*/
function getNewestTrackbackList($obj) {
if($obj->mid) {
$oModuleModel = &getModel('module');
@ -98,9 +114,11 @@
return $output;
}
/**
* @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) {
// Bringing trackback module config
$oModuleModel = &getModel('module');
@ -113,9 +131,16 @@
return $module_trackback_config;
}
/**
* @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) {
$obj->regdate = date("YmdHis",time()-$time);
$obj->ipaddress = $ipaddress;
@ -127,20 +152,24 @@
return $output->data->count;
}
/**
* @brief return by creating a trackback url
* Adds the key value in the trackback url.
**/
/**
* Return by creating a trackback url
* Adds the key value in the trackback url.
* @param int $document_srl
* @return string
*/
function getTrackbackUrl($document_srl) {
$url = getFullUrl('','document_srl',$document_srl,'act','trackback','key',$this->getTrackbackKey($document_srl));
return $url;
}
/**
* @brief Return keys by generating
* 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
**/
/**
* Return keys by generating
* 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
* @param int $document_srl
* @return string
*/
function getTrackbackKey($document_srl) {
$time = (int) (time()/(60*10));
$db_info = Context::getDBInfo();

View file

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