AnnotationWithRequiredAttributes.php 989 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace Doctrine\Tests\Common\Annotations\Fixtures;
  3. /**
  4. * @Annotation
  5. * @Target("ALL")
  6. * @Attributes({
  7. @Attribute("value", required = true , type = "string"),
  8. @Attribute("annot", required = true , type = "Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation"),
  9. })
  10. */
  11. final class AnnotationWithRequiredAttributes
  12. {
  13. public final function __construct(array $data)
  14. {
  15. foreach ($data as $key => $value) {
  16. $this->$key = $value;
  17. }
  18. }
  19. /**
  20. * @var string
  21. */
  22. private $value;
  23. /**
  24. *
  25. * @var Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation
  26. */
  27. private $annot;
  28. /**
  29. * @return string
  30. */
  31. public function getValue()
  32. {
  33. return $this->value;
  34. }
  35. /**
  36. * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation
  37. */
  38. public function getAnnot()
  39. {
  40. return $this->annot;
  41. }
  42. }