Changeset 432
- Timestamp:
- 03/28/07 23:27:35 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBColumnAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBTableAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/annotations (added)
- trunk/src/main/php/net/stubbles/reflection/annotations/stubAbstractAnnotation.php (moved) (moved from trunk/src/main/php/net/stubbles/reflection/stubAbstractAnnotation.php) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotation.php (moved) (moved from trunk/src/main/php/net/stubbles/reflection/stubAnnotation.php) (2 diffs)
- trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotationCache.php (moved) (moved from trunk/src/main/php/net/stubbles/reflection/stubAnnotationCache.php) (2 diffs)
- trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotationFactory.php (moved) (moved from trunk/src/main/php/net/stubbles/reflection/stubAnnotationFactory.php) (3 diffs)
- trunk/src/main/php/net/stubbles/reflection/reflection.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionProperty.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLAttributeAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLIgnoreAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLMatcherAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLPropertiesAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLTagAnnotation.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/xml/xsl/XSLMethod.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/reflection/ReflectionTestSuite.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/reflection/annotations (added)
- trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryApplicableTestCase.php (moved) (moved from trunk/src/test/php/net/stubbles/reflection/stubAnnotationFactoryApplicableTestCase.php) (1 diff)
- trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryBuildTestCase.php (moved) (moved from trunk/src/test/php/net/stubbles/reflection/stubAnnotationFactoryBuildTestCase.php) (2 diffs)
- trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryTestCase.php (moved) (moved from trunk/src/test/php/net/stubbles/reflection/stubAnnotationFactoryTestCase.php) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBColumnAnnotation.php
r333 r432 7 7 * @subpackage rdbms_persistence_annotations 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation'9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation' 11 11 ); 12 12 /** trunk/src/main/php/net/stubbles/rdbms/persistence/annotations/stubDBTableAnnotation.php
r246 r432 7 7 * @subpackage rdbms_persistence_annotations 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation'9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation' 11 11 ); 12 12 /** trunk/src/main/php/net/stubbles/reflection/annotations/stubAbstractAnnotation.php
r65 r432 5 5 * @author Frank Kleine <mikey@stubbles.net> 6 6 * @package stubbles 7 * @subpackage reflection 7 * @subpackage reflection_annotations 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation'); 9 10 /** 10 11 * Abstract base class for annotations 11 12 * 12 13 * @package stubbles 13 * @subpackage reflection 14 * @subpackage reflection_annotations 14 15 */ 15 16 abstract class stubAbstractAnnotation extends stubBaseObject implements stubAnnotation trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotation.php
r18 r432 5 5 * @author Frank Kleine <mikey@stubbles.net> 6 6 * @package stubbles 7 * @subpackage reflection 7 * @subpackage reflection_annotations 8 8 */ 9 9 /** … … 11 11 * 12 12 * @package stubbles 13 * @subpackage reflection 13 * @subpackage reflection_annotations 14 14 */ 15 15 interface stubAnnotation trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotationCache.php
r64 r432 5 5 * @author Stephan Schmidt <schst@stubbles.net> 6 6 * @package stubbles 7 * @subpackage reflection 7 * @subpackage reflection_annotations 8 8 */ 9 9 /** … … 12 12 * @static 13 13 * @package stubbles 14 * @subpackage reflection 14 * @subpackage reflection_annotations 15 15 */ 16 16 class stubAnnotationCache trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotationFactory.php
r395 r432 6 6 * @author Stephan Schmidt <schst@stubbles.net> 7 7 * @package stubbles 8 * @subpackage reflection 8 * @subpackage reflection_annotations 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection.stubAnnotation', 11 'net.stubbles.reflection.stubAnnotationCache'); 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 11 'net.stubbles.reflection.annotations.stubAnnotationCache' 12 ); 12 13 /** 13 14 * Factory to create annotations. … … 15 16 * @static 16 17 * @package stubbles 17 * @subpackage reflection 18 * @subpackage reflection_annotations 18 19 */ 19 20 class stubAnnotationFactory … … 58 59 59 60 if (($annotation instanceof stubAnnotation) == false) { 60 throw new ReflectionException('The annotation: ' . $annotationName . ' is not an instance of reflection.stubAnnotation.');61 throw new ReflectionException('The annotation: ' . $annotationName . ' is not an instance of net.stubbles.reflection.annotations.stubAnnotation.'); 61 62 } 62 63 $annotationType = self::findAnnotationClass($annotationName, true); trunk/src/main/php/net/stubbles/reflection/reflection.php
r252 r432 7 7 * @subpackage reflection 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation',11 'net.stubbles.reflection. stubAnnotationFactory',9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation', 11 'net.stubbles.reflection.annotations.stubAnnotationFactory', 12 12 'net.stubbles.reflection.stubBaseReflectionClass', 13 13 'net.stubbles.reflection.stubReflectionClass', trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php
r408 r432 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory',10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 11 11 'net.stubbles.reflection.stubBaseReflectionClass', 12 12 'net.stubbles.reflection.stubReflectionExtension', trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php
r253 r432 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory',10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 11 11 'net.stubbles.reflection.stubReflectionParameter' 12 12 ); trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php
r253 r432 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory',10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 11 11 'net.stubbles.reflection.stubReflectionClass', 12 12 'net.stubbles.reflection.stubReflectionParameter' trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php
r255 r432 9 9 */ 10 10 stubClassLoader::load('net.stubbles.reflection.stubReflectionClass', 11 'net.stubbles.reflection. stubAnnotationFactory',11 'net.stubbles.reflection.annotations.stubAnnotationFactory', 12 12 'net.stubbles.reflection.stubBaseReflectionClass', 13 13 'net.stubbles.reflection.stubReflectionExtension', trunk/src/main/php/net/stubbles/reflection/stubReflectionProperty.php
r253 r432 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory',10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 11 11 'net.stubbles.reflection.stubReflectionClass' 12 12 ); trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLAttributeAnnotation.php
r213 r432 7 7 * @subpackage xml_serializer 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation'); 11 11 12 12 /** trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLIgnoreAnnotation.php
r213 r432 7 7 * @subpackage xml_serializer 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation'); 11 11 12 12 /** trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLMatcherAnnotation.php
r393 r432 7 7 * @subpackage xml_serializer 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation'); 11 11 12 12 /** trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLPropertiesAnnotation.php
r393 r432 7 7 * @subpackage xml_serializer 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation'); 11 11 12 12 /** trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLTagAnnotation.php
r213 r432 7 7 * @subpackage xml_serializer 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation'); 11 11 12 12 /** trunk/src/main/php/net/stubbles/xml/xsl/XSLMethod.php
r180 r432 7 7 * @subpackage xml_xsl 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotation',10 'net.stubbles.reflection. stubAbstractAnnotation'9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotation', 10 'net.stubbles.reflection.annotations.stubAbstractAnnotation' 11 11 ); 12 12 /** trunk/src/test/php/net/stubbles/reflection/ReflectionTestSuite.php
r41 r432 21 21 { 22 22 $this->TestSuite('All Reflection tests'); 23 $this->addTestFile(dirname(__FILE__) . '/ stubAnnotationFactoryTestCase.php');24 $this->addTestFile(dirname(__FILE__) . '/ stubAnnotationFactoryApplicableTestCase.php');25 $this->addTestFile(dirname(__FILE__) . '/ stubAnnotationFactoryBuildTestCase.php');23 $this->addTestFile(dirname(__FILE__) . '/annotations/stubAnnotationFactoryTestCase.php'); 24 $this->addTestFile(dirname(__FILE__) . '/annotations/stubAnnotationFactoryApplicableTestCase.php'); 25 $this->addTestFile(dirname(__FILE__) . '/annotations/stubAnnotationFactoryBuildTestCase.php'); 26 26 $this->addTestFile(dirname(__FILE__) . '/stubReflectionClassTestCase.php'); 27 27 $this->addTestFile(dirname(__FILE__) . '/stubReflectionExtensionTestCase.php'); trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryApplicableTestCase.php
r98 r432 1 1 <?php 2 2 /** 3 * Test for stubAnnotationFactory::isApplicable().3 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory::isApplicable(). 4 4 * 5 5 * @author Frank Kleine <mikey@stubbles.net> 6 6 * @package stubbles 7 * @subpackage reflection_ test7 * @subpackage reflection_annotations_test 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory'); 10 10 Mock::generate('stubAnnotation'); 11 11 /** 12 * Test for stubAnnotationFactory::isApplicable().12 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory::isApplicable(). 13 13 * 14 14 * @package stubbles 15 * @subpackage reflection_ test15 * @subpackage reflection_annotations_test 16 16 */ 17 17 class stubAnnotationFactoryApplicableTestCase extends UnitTestCase trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryBuildTestCase.php
r98 r432 1 1 <?php 2 2 /** 3 * Test for stubAnnotationFactory::build().3 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory::build(). 4 4 * 5 5 * @author Frank Kleine <mikey@stubbles.net> 6 6 * @package stubbles 7 * @subpackage reflection_ test7 * @subpackage reflection_annotations_test 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory');9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory'); 10 10 Mock::generate('stubAnnotation'); 11 11 class stubMethodAnnotation implements stubAnnotation … … 44 44 } 45 45 /** 46 * Test for stubAnnotationFactory::build().46 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory::build(). 47 47 * 48 48 * @package stubbles 49 * @subpackage reflection_ test49 * @subpackage reflection_annotations_test 50 50 */ 51 51 class stubAnnotationFactoryBuildTestCase extends UnitTestCase trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryTestCase.php
r223 r432 1 1 <?php 2 2 /** 3 * Test for stubAnnotationFactory.3 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory. 4 4 * 5 5 * @author Frank Kleine <mikey@stubbles.net> 6 6 * @author Stephan Schmidt <schst@stubbles.net> 7 7 * @package stubbles 8 * @subpackage reflection_ test8 * @subpackage reflection_annotations_test 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection. stubAnnotationFactory',11 'net.stubbles.reflection. stubAnnotation',12 'net.stubbles.reflection. stubAbstractAnnotation',10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 11 'net.stubbles.reflection.annotations.stubAnnotation', 12 'net.stubbles.reflection.annotations.stubAbstractAnnotation', 13 13 'net.stubbles.reflection.stubReflectionClass' 14 14 ); 15 16 15 17 16 /** 18 17 * Test Annotation 19 18 * 20 * @author Stephan Schmidt <schst@stubbles.net>21 19 * @package stubbles 22 * @subpackage reflection_ test20 * @subpackage reflection_annotations_test 23 21 */ 24 class MyAnnotation extends stubAbstractAnnotation implements stubAnnotation {25 22 class MyAnnotation extends stubAbstractAnnotation implements stubAnnotation 23 { 26 24 public $foo; 27 25 public $argh; … … 33 31 * @return int 34 32 */ 35 public function getAnnotationTarget() { 36 return stubAnnotation::TARGET_ALL; 37 } 33 public function getAnnotationTarget() { return stubAnnotation::TARGET_ALL; } 38 34 } 39 35 … … 42 38 * 43 39 */ 44 interface CastedAnnotation { 40 interface CastedAnnotation { } 41 42 /** 43 * Test Annotation 44 * 45 * @author Stephan Schmidt <schst@stubbles.net> 46 * @package stubbles 47 * @subpackage reflection_test 48 */ 49 class AnotherAnnotation extends stubAbstractAnnotation implements stubAnnotation, CastedAnnotation 50 { 51 public $value; 52 public function getAnnotationTarget() { return stubAnnotation::TARGET_ALL; } 45 53 } 46 54 … … 52 60 * @subpackage reflection_test 53 61 */ 54 class AnotherAnnotation extends stubAbstractAnnotation implements stubAnnotation, CastedAnnotation { 55 56 public $value; 57 58 public function getAnnotationTarget() { 59 return stubAnnotation::TARGET_ALL; 60 } 61 } 62 63 /** 64 * Test Annotation 65 * 66 * @author Stephan Schmidt <schst@stubbles.net> 67 * @package stubbles 68 * @subpackage reflection_test 69 */ 70 class EmptyAnnotation extends stubAbstractAnnotation implements stubAnnotation { 71 public function getAnnotationTarget() { 72 return stubAnnotation::TARGET_CLASS; 73 } 62 class EmptyAnnotation extends stubAbstractAnnotation implements stubAnnotation 63 { 64 public function getAnnotationTarget() { return stubAnnotation::TARGET_CLASS; } 74 65 } 75 66 … … 88 79 89 80 /** 90 * Test for stubAnnotationFactory.81 * Test for net.stubbles.reflection.annotations.stubAnnotationFactory. 91 82 * 92 83 * @package stubbles
