Changeset 255
- Timestamp:
- 02/10/07 17:37:15 (2 years ago)
- Files:
-
- trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/reflection/stubReflectionClassTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/reflection/stubReflectionObjectTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php
r252 r255 20 20 interface stubBaseReflectionClass 21 21 { 22 // intentionally empty 22 /** 23 * returns the full qualified class name of the reflected class 24 * 25 * If the class has not been loaded with stubClassLoader the non qualified 26 * class name will be returned. 27 * 28 * @return string 29 */ 30 public function getFullQualifiedClassName(); 23 31 } 24 32 ?> trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php
r253 r255 106 106 * returns the full qualified class name of the reflected class 107 107 * 108 * Only possible for classes loaded with stubClassLoader. 108 * If the class has not been loaded with stubClassLoader the non qualified 109 * class name will be returned. 109 110 * 110 111 * @return string … … 112 113 public function getFullQualifiedClassName() 113 114 { 114 return stubClassLoader::getFullQualifiedClassName($this->className); 115 $fqClassName = stubClassLoader::getFullQualifiedClassName($this->className); 116 if (null == $fqClassName) { 117 return $this->className; 118 } 119 120 return $fqClassName; 115 121 } 116 122 trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php
r254 r255 126 126 * returns the full qualified class name of the reflected class 127 127 * 128 * Only possible for classes loaded with stubClassLoader. 128 * If the class has not been loaded with stubClassLoader the non qualified 129 * class name will be returned. 129 130 * 130 131 * @return string … … 132 133 public function getFullQualifiedClassName() 133 134 { 134 return stubClassLoader::getFullQualifiedClassName($this->className); 135 $fqClassName = stubClassLoader::getFullQualifiedClassName($this->className); 136 if (null == $fqClassName) { 137 return $this->className; 138 } 139 140 return $fqClassName; 135 141 } 136 142 trunk/src/test/php/net/stubbles/reflection/stubReflectionClassTestCase.php
r98 r255 62 62 $this->assertTrue((string) $this->stubRefClass1, "reflection.stubReflectionClass[stubTestWithMethodsAndProperties] {\n}\n"); 63 63 $this->assertTrue((string) $this->stubRefClass2, "reflection.stubReflectionClass[stubTestWithOutMethodsAndProperties] {\n}\n"); 64 } 65 66 /** 67 * test the full qualified class name 68 */ 69 public function testGetFullQualifiedClassName() 70 { 71 $this->assertEqual($this->stubRefClass1->getFullQualifiedClassName(), 'stubTestWithMethodsAndProperties'); 72 $this->assertEqual($this->stubRefClass2->getFullQualifiedClassName(), 'stubTestWithOutMethodsAndProperties'); 64 73 } 65 74 trunk/src/test/php/net/stubbles/reflection/stubReflectionObjectTestCase.php
r254 r255 79 79 80 80 /** 81 * test the full qualified class name 82 */ 83 public function testGetFullQualifiedClassName() 84 { 85 $this->assertEqual($this->stubRefClass1->getFullQualifiedClassName(), 'stubTestWithMethodsAndProperties'); 86 $this->assertEqual($this->stubRefClass2->getFullQualifiedClassName(), 'stubTestWithOutMethodsAndProperties'); 87 } 88 89 /** 81 90 * test that the original object instance is returned 82 91 */
