From bcda10ab01047c7cce425e6894dc76a356c21fc4 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 4 Jun 2006 04:01:48 +0000 Subject: TComponentReflection now returns comments also. --- framework/TComponent.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/TComponent.php b/framework/TComponent.php index 5501f137..103b041e 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -659,6 +659,7 @@ class TComponentReflection extends TComponent 'type'=>$this->determinePropertyType($method), 'readonly'=>!$class->hasMethod('set'.$name), 'class'=>$className, + 'comments'=>$method->getDocComment() ); } } @@ -670,6 +671,7 @@ class TComponentReflection extends TComponent $this->_events[]=array( 'name'=>$name, 'class'=>$className, + 'comments'=>$method->getDocComment() ); } } @@ -699,10 +701,12 @@ class TComponentReflection extends TComponent } /** - * @return array list of component properties. Each array element is of the following - * structure: [name]=>property name, [type]=>property type, - * [readonly]=>whether the property is read-only, [class]=>the class where the - * property is inherited from + * @return array list of component properties. Each array element is of the following structure: + * [name]=>property name, + * [type]=>property type, + * [readonly]=>whether the property is read-only, + * [class]=>the class where the property is inherited from, + * [comments]=>comments associated with the property. */ public function getProperties() { @@ -710,8 +714,10 @@ class TComponentReflection extends TComponent } /** - * @return array list of component events. Each array element is of the following - * structure: [name]=>event name,[class]=>the class where the event is inherited from + * @return array list of component events. Each array element is of the following structure: + * [name]=>event name, + * [class]=>the class where the event is inherited from. + * [comments]=>comments associated with the event. */ public function getEvents() { -- cgit v1.2.3