summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateControl.php
diff options
context:
space:
mode:
authorxue <>2005-11-16 04:43:07 +0000
committerxue <>2005-11-16 04:43:07 +0000
commit0574d94e46047b5a669610bc6ebf784be0c7a7bc (patch)
tree24912b00a948b22ce86f6ff4f551127fe671c738 /framework/Web/UI/TTemplateControl.php
parent2d0e1fb6150d2864bb3c756406163d90341cf64d (diff)
Fixed a bug about storing parsed template.
Diffstat (limited to 'framework/Web/UI/TTemplateControl.php')
-rw-r--r--framework/Web/UI/TTemplateControl.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/UI/TTemplateControl.php b/framework/Web/UI/TTemplateControl.php
index ee205b33..19663002 100644
--- a/framework/Web/UI/TTemplateControl.php
+++ b/framework/Web/UI/TTemplateControl.php
@@ -41,7 +41,7 @@ class TTemplateControl extends TControl implements INamingContainer
/**
* @var ITemplate the parsed template structure shared by the same control class
*/
- protected static $_template=null;
+ protected static $_template=array();
/**
* @var ITemplate the parsed template structure specific for this control instance
*/
@@ -85,7 +85,8 @@ class TTemplateControl extends TControl implements INamingContainer
{
if($this->_localTemplate===null)
{
- eval('$tpl='.get_class($this).'::$_template;');
+ $class=get_class($this);
+ $tpl=isset(self::$_template[$class])?self::$_template[$class]:null;
return ($tpl===null && $load)?$this->loadTemplate():$tpl;
}
else
@@ -110,7 +111,7 @@ class TTemplateControl extends TControl implements INamingContainer
protected function loadTemplate()
{
$template=Prado::getApplication()->getService()->getTemplateManager()->getTemplateByClassName(get_class($this));
- eval(get_class($this).'::$_template=$template;');
+ self::$_template[get_class($this)]=$template;
return $template;
}