diff options
author | xue <> | 2006-04-09 17:12:45 +0000 |
---|---|---|
committer | xue <> | 2006-04-09 17:12:45 +0000 |
commit | 46dd185faab6a0387face5700c4b69c69f9f933c (patch) | |
tree | 70542df9111a8aaae00869081f5f7187c43b9aac /framework/Web/UI/TTemplateManager.php | |
parent | bfa60270a735a7a08a545a9bc1c972e8bf0bc590 (diff) |
Cache key for TOutputCache now also uses PagePath.
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 07d65fd0..7961a121 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -289,11 +289,11 @@ class TTemplate extends TApplicationComponent implements ITemplate if(isset($object[2])) // component
{
$component=Prado::createComponent($object[1]);
- if($component instanceof TOutputCache)
- $component->setCacheKeyPrefix($this->_hashCode.$key);
$properties=&$object[2];
if($component instanceof TControl)
{
+ if($component instanceof TOutputCache)
+ $component->setCacheKeyPrefix($this->_hashCode.$key);
$component->setTemplateControl($tplControl);
if(isset($properties['id']))
{
@@ -332,17 +332,16 @@ class TTemplate extends TApplicationComponent implements ITemplate $parent->addParsedObject($component);
}
}
- else // string
+ else if(is_string($object[1]))
+ $parent->addParsedObject($object[1]);
+ else if($object[1] instanceof TCompositeLiteral)
{
- if($object[1] instanceof TCompositeLiteral)
- {
- $o=clone $object[1];
- $o->setContainer($tplControl);
- $parent->addParsedObject($o);
- }
- else
- $parent->addParsedObject($object[1]);
+ $o=clone $object[1];
+ $o->setContainer($tplControl);
+ $parent->addParsedObject($o);
}
+ else
+ throw new TConfigurationException('template_content_unexpected',(string)$object[1]);
}
}
|