Changeset 1083
- Timestamp:
- 11/28/07 14:45:02 (9 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php (modified) (8 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php
r1027 r1083 28 28 */ 29 29 protected $className; 30 /**31 * docblock comment for this class32 *33 * @var string34 */35 protected $docComment;36 30 37 31 /** … … 57 51 $this->className = $className; 58 52 parent::__construct($className); 59 $this->docComment = $this->getDocComment();60 53 } 61 54 … … 68 61 public function hasAnnotation($annotationName) 69 62 { 70 return stubAnnotationFactory::has($this-> docComment, $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName());63 return stubAnnotationFactory::has($this->getDocComment(), $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName()); 71 64 } 72 65 … … 80 73 public function getAnnotation($annotationName) 81 74 { 82 return stubAnnotationFactory::create($this-> docComment, $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName());75 return stubAnnotationFactory::create($this->getDocComment(), $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName()); 83 76 } 84 77 … … 159 152 } 160 153 161 $stubRefMethod = new stubReflectionMethod($this ->className, $name);154 $stubRefMethod = new stubReflectionMethod($this, $name); 162 155 return $stubRefMethod; 163 156 } … … 173 166 $stubMethods = array(); 174 167 foreach ($methods as $method) { 175 $stubMethods[] = new stubReflectionMethod($this ->className, $method->getName());168 $stubMethods[] = new stubReflectionMethod($this, $method->getName()); 176 169 } 177 170 … … 191 184 } 192 185 193 $stubRefProperty = new stubReflectionProperty($this ->className, $name);186 $stubRefProperty = new stubReflectionProperty($this, $name); 194 187 return $stubRefProperty; 195 188 } … … 205 198 $stubProperties = array(); 206 199 foreach ($properties as $property) { 207 $stubProperties[] = new stubReflectionProperty($this ->className, $property->getName());200 $stubProperties[] = new stubReflectionProperty($this, $property->getName()); 208 201 } 209 202 trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php
r1078 r1083 114 114 $stubParameters = array(); 115 115 foreach ($parameters as $parameter) { 116 $stubParameters[] = new stubReflectionParameter($this ->functionName, $parameter->getName());116 $stubParameters[] = new stubReflectionParameter($this, $parameter->getName()); 117 117 } 118 118 trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php
r1082 r1083 126 126 $refClass = parent::getDeclaringClass(); 127 127 if ($refClass->getName() === $this->className) { 128 if (null !== $this->refClass) {128 if (null === $this->refClass) { 129 129 $this->refClass = new stubReflectionClass($this->className); 130 130 } … … 147 147 $stubParameters = array(); 148 148 foreach ($parameters as $parameter) { 149 $stubParameters[] = new stubReflectionParameter( array($this->className, $this->methodName), $parameter->getName());149 $stubParameters[] = new stubReflectionParameter($this, $parameter->getName()); 150 150 } 151 151 trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php
r940 r1083 35 35 */ 36 36 protected $classObject; 37 /**38 * docblock comment for this class39 *40 * @var string41 */42 protected $docComment;43 37 44 38 /** … … 52 46 $this->classObject = $classObject; 53 47 parent::__construct($classObject); 54 $this->docComment = $this->getDocComment();55 48 } 56 49 … … 63 56 public function hasAnnotation($annotationName) 64 57 { 65 return stubAnnotationFactory::has($this-> docComment, $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName());58 return stubAnnotationFactory::has($this->getDocComment(), $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName()); 66 59 } 67 60 … … 75 68 public function getAnnotation($annotationName) 76 69 { 77 return stubAnnotationFactory::create($this-> docComment, $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName());70 return stubAnnotationFactory::create($this->getDocComment(), $annotationName, stubAnnotation::TARGET_CLASS, $this->className, $this->getFileName()); 78 71 } 79 72 … … 176 169 } 177 170 178 $stubRefMethod = new stubReflectionMethod($this ->className, $name);171 $stubRefMethod = new stubReflectionMethod($this, $name); 179 172 return $stubRefMethod; 180 173 } … … 190 183 $stubMethods = array(); 191 184 foreach ($methods as $method) { 192 $stubMethods[] = new stubReflectionMethod($this ->className, $method->getName());185 $stubMethods[] = new stubReflectionMethod($this, $method->getName()); 193 186 } 194 187 … … 208 201 } 209 202 210 $stubRefProperty = new stubReflectionProperty($this ->className, $name);203 $stubRefProperty = new stubReflectionProperty($this, $name); 211 204 return $stubRefProperty; 212 205 } … … 222 215 $stubProperties = array(); 223 216 foreach ($properties as $property) { 224 $stubProperties[] = new stubReflectionProperty($this ->className, $property->getName());217 $stubProperties[] = new stubReflectionProperty($this, $property->getName()); 225 218 } 226 219
