diff options
author | wei <> | 2006-04-28 01:22:42 +0000 |
---|---|---|
committer | wei <> | 2006-04-28 01:22:42 +0000 |
commit | eb2a6e9431445b3cb24be4b75f02f07aef70aebc (patch) | |
tree | d634891aa58ed491398d8eef5d80fc7f467f1070 /framework/Web/UI/WebControls | |
parent | 639a6b1c052f8b3ef1d1063843cae1c88ef4f346 (diff) |
New abstract TCompositeControl + FT tests
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TCompositeControl.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TCompositeControl.php b/framework/Web/UI/WebControls/TCompositeControl.php new file mode 100644 index 00000000..80f2259c --- /dev/null +++ b/framework/Web/UI/WebControls/TCompositeControl.php @@ -0,0 +1,49 @@ +<?php
+/**
+ * TCompositeControl class file.
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2005 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ * @package System.Web.UI
+ */
+
+/**
+ * The TCompositeControl class is an abstract class that provides naming
+ * container and control designer functionality for custom controls that
+ * encompass child controls in their entirety or use the functionality of other
+ * controls. You cannot use this class directly.
+ *
+ * To create a custom composite control, derive from the CompositeControl class.
+ * The functionality this class provides is built-in verification that child
+ * controls have been created prior to being accessed
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @version $Revision: $ $Date: $
+ * @package System.Web.UI
+ * @since 3.0
+ */
+abstract class TCompositeControl extends TTemplateControl
+{
+ /**
+ * The constructor ensures the child controls are created.
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->recreateChildControls();
+ }
+
+ /**
+ * Recreates the child controls in a control derived from TCompositeControl.
+ */
+ protected function recreateChildControls()
+ {
+ $this->ensureChildControls();
+ }
+
+}
+
+?>
|