From f618592c07c32c4955367a4c5bf9c4e18727cefe Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 1 Jan 2006 21:28:57 +0000 Subject: Enhanced support to attribute access. --- framework/Web/UI/TControl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/TControl.php') diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 545bdf66..03d962f4 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -506,14 +506,14 @@ class TControl extends TComponent } /** - * @return string attribute value, '' if attribute does not exist + * @return string attribute value, null if attribute does not exist */ public function getAttribute($name) { if($attributes=$this->getViewState('Attributes',null)) return $attributes->itemAt($name); else - return ''; + return null; } /** @@ -528,14 +528,14 @@ class TControl extends TComponent /** * Removes the named attribute. * @param string the name of the attribute to be removed. - * @return string attribute value removed, empty string if attribute does not exist. + * @return string attribute value removed, null if attribute does not exist. */ public function removeAttribute($name) { if($attributes=$this->getViewState('Attributes',null)) return $attributes->remove($name); else - return ''; + return null; } /** -- cgit v1.2.3