[xoops-cvslog 5388] CVS update: xoops2jp/html/modules/legacy/kernel

Back to archive index

Minahito minah****@users*****
2006年 10月 17日 (火) 18:49:22 JST


Index: xoops2jp/html/modules/legacy/kernel/Legacy_Module.class.php
diff -u xoops2jp/html/modules/legacy/kernel/Legacy_Module.class.php:1.1.2.5 xoops2jp/html/modules/legacy/kernel/Legacy_Module.class.php:1.1.2.6
--- xoops2jp/html/modules/legacy/kernel/Legacy_Module.class.php:1.1.2.5	Tue Oct 17 00:35:31 2006
+++ xoops2jp/html/modules/legacy/kernel/Legacy_Module.class.php	Tue Oct 17 18:49:22 2006
@@ -4,6 +4,15 @@
  * @version $Id$
  */
 
+ /**
+  * This is an abstract class which has interfaces to connect with the
+  * controller about the module process. Legacy controller has a instance of
+  * the sub-class of this class. So module developers may define their
+  * sub-classes.
+  * 
+  * @see Legacy_Utils::createModule()
+  * @see XoopsModule
+  */
 class Legacy_AbstractModule
 {
 	/**
@@ -24,10 +33,22 @@
 	 */
 	var $mModuleConfig = array();
 	
+	/**
+	 * @var Legacy_AbstractCacheInformation
+	 */
 	var $mCacheInfo = null;
 	
+	/**
+	 * [READ ONLY] The render target instance for this module.
+	 * @access public
+	 * @var XCube_RenderTarget
+	 * @see Legacy_Module::getRenderBuffer()
+	 */
 	var $mRender = null;
 	
+	/**
+	 * 
+	 */
 	function Legacy_AbstractModule(&$module)
 	{
 		$this->setXoopsModule($module);
@@ -110,7 +131,12 @@
 		
 		return isset($this->mModuleConfig[$key]) ? $this->mModuleConfig[$key] : null;
 	}
-	
+
+	/**
+	 * Gets the cache information instance.
+	 * @return Legacy_ModuleCaceInformation
+	 * @see Legacy_Module::_createChaceInfo()
+	 */	
 	function &getCacheInfo()
 	{
 		if (!is_object($this->mCacheInfo)) {
@@ -121,7 +147,12 @@
 	}
 	
 	/**
+	 * Creates a cache information instance and returns it. This member
+	 * function sets the created instance to mCacheInfo because this instance
+	 * has to keep the instance for many callbacks.
 	 * @access protected
+	 * @return Legacy_ModuleCacheInformation
+	 * @see Legacy_Module::getCacheInfo()
 	 */
 	function _createCacheInfo()
 	{
@@ -130,6 +161,12 @@
 		$this->mCacheInfo->setModule($this->mXoopsModule);
 	}
 	
+	/**
+	 * Gets the render target instance.
+	 * @access public
+	 * @return XCube_RenderTarget
+	 * @see Legacy_Module::_createRenderBuffer()
+	 */
 	function &getRenderBuffer()
 	{
 		if ($this->mRender == null) {
@@ -138,7 +175,15 @@
 		
 		return $this->mRender;
 	}
-	
+
+	/**
+	 * Creates a render target instance and returns it. This member function
+	 * sets the created instance to mRender because this instance has to keep
+	 * the instance for many callbacks.
+	 * @access protected
+	 * @return XCube_RenderTarget
+	 * @see Legacy_Module::getRenderBuffer()
+	 */	
 	function _createRenderBuffer()
 	{
 		$root =& XCube_Root::getSingleton();
@@ -150,12 +195,20 @@
 		}
 	}
 	
+	/**
+	 * Gets a name of the dependency render system.
+	 * @return string
+	 */
 	function getRenderSystemName()
 	{
 		$root =& XCube_Root::getSingleton();
 		return $root->mContext->mBaseRenderSystemName;
 	}
 	
+	/**
+	 * Gets a value indicating whether this modules is an active.
+	 * @return bool
+	 */
 	function isActive()
 	{
 		if (!is_object($this->mXoopsModule)) {	//< FIXME
@@ -202,29 +255,63 @@
 	{
 	}
 	
+	/**
+	 * This method is called back by the action search feature in the control
+	 * panel.
+	 * 
+	 * @param Legacy_ActionSearchArgs $searchArgs
+	 * @see Legacy_ActionSearchArgs
+	 */
 	function doActionSearch(&$searchArgs)
 	{
 	}
 	
+	/**
+	 * This method is called back by the xoops global search feature.
+	 * 
+	 * @param Legacy_ActionSearchArgs $searchArgs
+	 * @see Legacy_ActionSearchArgs
+	 */
 	function doLegacyGlobalSearch($queries, $andor, $max_hit, $start, $uid)
 	{
 	}
 	
+	/**
+	 * Gets a value indicating whether this module has the page controller in
+	 * the control panel side.
+	 * 
+	 * @return bool
+	 * @note Side menu blocks may not display the admin menu if this member
+	 * function returns false.
+	 */
 	function hasAdminIndex()
 	{
 		return false;
 	}
 	
+	/**
+	 * Gets an absolute URL indicating the top page of this module for the
+	 * control panel side.
+	 * @return string
+	 */
 	function getAdminIndex()
 	{
 		return null;
 	}
 	
+	/**
+	 * Gets an array having menus for the side menu of the control panel.
+	 * @return array
+	 * @see /modules/legacy/admin/templates/blocks/legacy_admin_block_sidemenu.html
+	 */
 	function getAdminMenu()
 	{
 	}
 }
 
+/**
+ * This is an adapter class which imitates XOOPS2 responses.
+ */
 class Legacy_ModuleAdapter extends Legacy_AbstractModule
 {
 	var $_mAdminMenuLoadedFlag = false;


xoops-cvslog メーリングリストの案内
Back to archive index