[xoops-cvslog 4933] CVS update: xoops2jp/html/core

Back to archive index

Minahito minah****@users*****
2006年 10月 11日 (水) 17:17:43 JST


Index: xoops2jp/html/core/XCube_RenderSystem.class.php
diff -u xoops2jp/html/core/XCube_RenderSystem.class.php:1.1.2.1 xoops2jp/html/core/XCube_RenderSystem.class.php:1.1.2.2
--- xoops2jp/html/core/XCube_RenderSystem.class.php:1.1.2.1	Fri Sep 29 17:13:22 2006
+++ xoops2jp/html/core/XCube_RenderSystem.class.php	Wed Oct 11 17:17:43 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package XCube
- * @version $Id: XCube_RenderSystem.class.php,v 1.1.2.1 2006/09/29 08:13:22 minahito Exp $
+ * @version $Id: XCube_RenderSystem.class.php,v 1.1.2.2 2006/10/11 08:17:43 minahito Exp $
  */
 
  if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -18,10 +18,10 @@
  * We prepare the following constants for the flag of a render-target instead of
  * the group of many classes. 
  */
-define("XCUBE_RENDER_TARGET_TYPE_BUFFER",0);
-define("XCUBE_RENDER_TARGET_TYPE_THEME",1);
-define("XCUBE_RENDER_TARGET_TYPE_BLOCK",2);
-define("XCUBE_RENDER_TARGET_TYPE_MAIN",3);
+define("XCUBE_RENDER_TARGET_TYPE_BUFFER", null);
+define("XCUBE_RENDER_TARGET_TYPE_THEME", 'theme');
+define("XCUBE_RENDER_TARGET_TYPE_BLOCK", 'block');
+define("XCUBE_RENDER_TARGET_TYPE_MAIN", 'main');
 
 /**
  * This is a target whom a render-system renders. This has a buffer and receives
@@ -30,16 +30,19 @@
  */
 class XCube_RenderTarget
 {
-	var $mName=null;
+	var $mName = null;
 
-	var $mRenderBuffer=null;
+	var $mRenderBuffer = null;
 	
 	var $mModuleName = null;
 	
-	var $mTemplateName=null;
+	var $mTemplateName = null;
 
 	var $mAttributes = array();
 	
+	/**
+	 * @deprecated
+	 */
 	var $mType = XCUBE_RENDER_TARGET_TYPE_BUFFER;
 	
 	var $mCacheTime = null;
@@ -58,16 +61,6 @@
 		return $this->mName;
 	}
 	
-	function setModuleName($name)
-	{
-		$this->mModuleName = $name;
-	}
-	
-	function getModuleName()
-	{
-		return $this->mModuleName;
-	}
-
 	function setTemplateName($name)
 	{
 		$this->mTemplateName = $name;
@@ -121,19 +114,23 @@
 	/**
 	 * Set render-target type.
 	 * @param $type int Use constants that are defined by us.
+	 * @deprecated
 	 */
 	function setType($type)
 	{
 		$this->mType = $type;
+		$this->setAttribute('legacy_buffertype', $type);
 	}
 	
 	/**
 	 * Return render-target type.
 	 * @return int
+	 * @deprecated
 	 */
 	function getType()
 	{
-		return $this->mType;
+		return $this->getAttribute('legacy_buffertype', $type);
+		//return $this->mType;
 	}
 	
 	/**
@@ -142,7 +139,6 @@
 	function reset()
 	{
 		$this->setTemplateName(null);
-		$this->setModuleName(null);
 		unset($this->mAttributes);
 		$this->mAttributes = array();
 		$this->mRenderBuffer = null;
@@ -181,14 +177,11 @@
 	/**
 	 * Create an object of the render-target, and return it.
 	 *
-	 * @param  int  $type  The number which shows the type of the render-target. Use constants.
 	 * @return XCube_RenderTarget
 	 */
-	function &createRenderTarget($type = XCUBE_RENDER_TARGET_TYPE_MAIN)
+	function &createRenderTarget()
 	{
 		$renderTarget =& new XCube_RenderTarget();
-		$renderTarget->setType($type);
-
 		return $renderTarget;
 	}
 


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