[xoops-cvslog 3906] CVS update: xoops2jp/html/modules/base/kernel

Back to archive index

Minahito minah****@users*****
2006年 8月 3日 (木) 18:42:06 JST


Index: xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.7 xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.8
--- xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.7	Wed Jul 26 11:54:44 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php	Thu Aug  3 18:42:06 2006
@@ -1,45 +1,36 @@
 <?php
 /**
  * @package legacy
+ * @version $Id: Legacy_ModuleController.class.php,v 1.1.2.8 2006/08/03 09:42:06 minahito Exp $
  */
-// $Id: Legacy_ModuleController.class.php,v 1.1.2.7 2006/07/26 02:54:44 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//              XOOPS Cube - PHP Content Management System                   //
-//                  Copyright (c) 2005 XOOPS Cube.org                        //
-//                     <http://www.xoopscube.org/>                           //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
 define("LEGACY_XOOPS_MODULE_MANIFESTO_FILENAME", "./xoops_version.php");
 
+/**
+ * This class is the part of Legacy_Controller. Because that controller class
+ * is too large, this class has been separated. And, this class is the strategy
+ * at Legacy_Controller.
+ */
 class Legacy_ModuleController
 {
-	var $mModuleObject;
-
+	/**
+	 * @var Legacy_Controller
+	 */
 	var $mController;
 	
+	var $mModuleObject;
+	
 	var $mConfig;
 	
+	/**
+	 * The render buffer for this module.
+	 *
+	 * @var XCube_RenderTarget
+	 */
+	var $mRenderTarget = null;
+	
 	function Legacy_ModuleController(&$controller)
 	{
 		$this->mController =& $controller;
@@ -55,6 +46,11 @@
 		}
 	}
 
+	function _isActiveCheck()
+	{
+		return true;
+	}
+
 	function prepare()
 	{
 		// Is this request module process?
@@ -64,7 +60,7 @@
 
 		$this->_createModuleObject();
 			
-		if (!$this->isActive()) {
+		if (!$this->isActive() && $this->_isActiveCheck()) {
 			return;
 		}
 
@@ -79,6 +75,13 @@
 			
 			define('__XC_DIRNAME__', $this->mModuleObject->getVar('dirname'));
 		}
+		
+		//
+		// Setup render buffer.
+		//
+		$renderSystem =& $this->mController->mRoot->getRenderSystem($this->getRenderSystemName());
+		$this->mRenderTarget =& $renderSystem->createRenderTarget(XCUBE_RENDER_TARGET_TYPE_MAIN);
+		$this->mRenderTarget->setModuleName($this->mModuleObject->get('dirname'));
 	}
 
 	/**
@@ -173,6 +176,19 @@
 		return $this->mModuleObject;
 	}
 	
+	function &getRenderTarget()
+	{
+		return $this->mRenderTarget;
+	}
+	
+	function getRenderSystemName()
+	{
+		return $this->getDependRenderSystem();
+	}
+	
+	/**
+	 * @deprecated
+	 */
 	function getDependRenderSystem()
 	{
 		return "Legacy_RenderSystem";


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