From e1ee81a09e299d5a9bc59ed59b04acfa3a85a935 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Feb 2006 05:25:37 +0000 Subject: Removed a few constructors. --- framework/Collections/TList.php | 1 - framework/Collections/TMap.php | 1 - framework/Data/TXmlDocument.php | 2 -- framework/Security/TAuthorizationRule.php | 1 - framework/Security/TUserManager.php | 1 - framework/TApplication.php | 2 -- framework/TComponent.php | 14 -------------- framework/Web/THttpRequest.php | 3 --- framework/Web/UI/TControl.php | 9 +++++++-- framework/Web/UI/WebControls/TCheckBoxList.php | 4 ++++ 10 files changed, 11 insertions(+), 27 deletions(-) (limited to 'framework') diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php index 1090ce77..7383b684 100644 --- a/framework/Collections/TList.php +++ b/framework/Collections/TList.php @@ -58,7 +58,6 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess */ public function __construct($data=null) { - parent::__construct(); if($data!==null) $this->copyFrom($data); } diff --git a/framework/Collections/TMap.php b/framework/Collections/TMap.php index 4d810503..7c46ae70 100644 --- a/framework/Collections/TMap.php +++ b/framework/Collections/TMap.php @@ -53,7 +53,6 @@ class TMap extends TComponent implements IteratorAggregate,ArrayAccess */ public function __construct($data=null) { - parent::__construct(); if($data!==null) $this->copyFrom($data); } diff --git a/framework/Data/TXmlDocument.php b/framework/Data/TXmlDocument.php index bb22b254..dfd65ebe 100644 --- a/framework/Data/TXmlDocument.php +++ b/framework/Data/TXmlDocument.php @@ -55,7 +55,6 @@ class TXmlElement extends TComponent */ public function __construct($tagName) { - parent::__construct(); $this->setTagName($tagName); } @@ -404,7 +403,6 @@ class TXmlElementList extends TList */ public function __construct(TXmlElement $owner) { - parent::__construct(); $this->_o=$owner; } diff --git a/framework/Security/TAuthorizationRule.php b/framework/Security/TAuthorizationRule.php index 81955a44..8248a45a 100644 --- a/framework/Security/TAuthorizationRule.php +++ b/framework/Security/TAuthorizationRule.php @@ -63,7 +63,6 @@ class TAuthorizationRule extends TComponent */ public function __construct($action,$users,$roles,$verb='') { - parent::__construct(); $action=strtolower(trim($action)); if($action==='allow' || $action==='deny') $this->_action=$action; diff --git a/framework/Security/TUserManager.php b/framework/Security/TUserManager.php index 06b5d321..c799c446 100644 --- a/framework/Security/TUserManager.php +++ b/framework/Security/TUserManager.php @@ -52,7 +52,6 @@ class TUser extends TComponent implements IUser */ public function __construct($manager=null) { - parent::__construct(); $this->_manager=$manager; } diff --git a/framework/TApplication.php b/framework/TApplication.php index b61fa30d..8cc1e9f9 100644 --- a/framework/TApplication.php +++ b/framework/TApplication.php @@ -289,8 +289,6 @@ class TApplication extends TComponent */ public function __construct($basePath='protected',$cacheConfig=true) { - parent::__construct(); - // register application as a singleton Prado::setApplication($this); diff --git a/framework/TComponent.php b/framework/TComponent.php index 8d6be46e..8a7f5f84 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -78,20 +78,6 @@ class TComponent */ private $_e=array(); - /** - * Constructor. - */ - public function __construct() - { - } - - /** - * Destructor. - */ - public function __destruct() - { - } - /** * Returns a property value or an event handler list by property or event name. * Do not call this method. This is a PHP magic method that we override diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 7ebd9151..2ee7cd5f 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -700,7 +700,6 @@ class THttpCookieCollection extends TList */ public function __construct($owner=null) { - parent::__construct(); $this->_o=$owner; } @@ -785,7 +784,6 @@ class THttpCookie extends TComponent */ public function __construct($name,$value) { - parent::__construct(); $this->_name=$name; $this->_value=$value; } @@ -967,7 +965,6 @@ class TUri extends TComponent */ public function __construct($uri) { - parent::__construct(); if(($ret=@parse_url($uri))!==false) { // decoding??? diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 104200ed..d1ae189a 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -164,6 +164,13 @@ class TControl extends TApplicationComponent */ private $_rf=array(); + /** + * Constructor. + */ + public function __construct() + { + } + /** * Returns a property value by name or a control by ID. * This overrides the parent implementation by allowing accessing @@ -1577,7 +1584,6 @@ class TControlList extends TList */ public function __construct(TControl $owner) { - parent::__construct(); $this->_o=$owner; } @@ -1661,7 +1667,6 @@ class TEmptyControlList extends TList */ public function __construct(TControl $owner) { - parent::__construct(); $this->_o=$owner; } diff --git a/framework/Web/UI/WebControls/TCheckBoxList.php b/framework/Web/UI/WebControls/TCheckBoxList.php index a7e6a11c..8a106b46 100644 --- a/framework/Web/UI/WebControls/TCheckBoxList.php +++ b/framework/Web/UI/WebControls/TCheckBoxList.php @@ -53,6 +53,10 @@ class TCheckBoxList extends TListControl implements IRepeatInfoUser, INamingCont private $_isEnabled; private $_changedEventRaised=false; + /** + * Constructor. + * Remember to call parent implementation if you override this method + */ public function __construct() { parent::__construct(); -- cgit v1.2.3