AnnotationWithAttributes.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. namespace Doctrine\Tests\Common\Annotations\Fixtures;
  3. /**
  4. * @Annotation
  5. * @Target("ALL")
  6. * @Attributes({
  7. @Attribute("mixed", type = "mixed"),
  8. @Attribute("boolean", type = "boolean"),
  9. @Attribute("bool", type = "bool"),
  10. @Attribute("float", type = "float"),
  11. @Attribute("string", type = "string"),
  12. @Attribute("integer", type = "integer"),
  13. @Attribute("array", type = "array"),
  14. @Attribute("arrayOfIntegers", type = "array<integer>"),
  15. @Attribute("annotation", type = "Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll"),
  16. @Attribute("arrayOfAnnotations", type = "array<Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll>"),
  17. })
  18. */
  19. final class AnnotationWithAttributes
  20. {
  21. public final function __construct(array $data)
  22. {
  23. foreach ($data as $key => $value) {
  24. $this->$key = $value;
  25. }
  26. }
  27. private $mixed;
  28. private $boolean;
  29. private $bool;
  30. private $float;
  31. private $string;
  32. private $integer;
  33. private $array;
  34. private $annotation;
  35. private $arrayOfIntegers;
  36. private $arrayOfAnnotations;
  37. /**
  38. * @return mixed
  39. */
  40. public function getMixed()
  41. {
  42. return $this->mixed;
  43. }
  44. /**
  45. * @return boolean
  46. */
  47. public function getBoolean()
  48. {
  49. return $this->boolean;
  50. }
  51. /**
  52. * @return bool
  53. */
  54. public function getBool()
  55. {
  56. return $this->bool;
  57. }
  58. /**
  59. * @return float
  60. */
  61. public function getFloat()
  62. {
  63. return $this->float;
  64. }
  65. /**
  66. * @return string
  67. */
  68. public function getString()
  69. {
  70. return $this->string;
  71. }
  72. public function getInteger()
  73. {
  74. return $this->integer;
  75. }
  76. /**
  77. * @return array
  78. */
  79. public function getArray()
  80. {
  81. return $this->array;
  82. }
  83. /**
  84. * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll
  85. */
  86. public function getAnnotation()
  87. {
  88. return $this->annotation;
  89. }
  90. /**
  91. * @return array<integer>
  92. */
  93. public function getArrayOfIntegers()
  94. {
  95. return $this->arrayOfIntegers;
  96. }
  97. /**
  98. * @return array<Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll>
  99. */
  100. public function getArrayOfAnnotations()
  101. {
  102. return $this->arrayOfAnnotations;
  103. }
  104. }