From 1f560ccd8a9e21871dbedd548fc97f231131c771 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 30 Aug 2006 12:33:43 +0000 Subject: merge from 3.0 branch till 1363. --- framework/TComponent.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'framework/TComponent.php') diff --git a/framework/TComponent.php b/framework/TComponent.php index 7564edff..21a62abd 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -415,6 +415,32 @@ class TComponent throw new TInvalidOperationException('component_statements_invalid',get_class($this),$statements,$e->getMessage()); } } + + /** + * This method is invoked after the component is instantiated by a template. + * When this method is invoked, the component's properties have been initialized. + * The default implementation of this method will invoke + * the potential parent component's {@link addParsedObject}. + * This method can be overriden. + * @param TComponent potential parent of this control + * @see addParsedObject + */ + public function createdOnTemplate($parent) + { + $parent->addParsedObject($this); + } + + /** + * Processes an object that is created during parsing template. + * The object can be either a component or a static text string. + * This method can be overriden to customize the handling of newly created objects in template. + * Only framework developers and control developers should use this method. + * @param string|TComponent text string or component parsed and instantiated in template + * @see createdOnTemplate + */ + public function addParsedObject($object) + { + } } /** -- cgit v1.2.3