Comment.php 465 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace JMS\Serializer\Tests\Fixtures;
  3. use JMS\Serializer\Annotation\Type;
  4. class Comment
  5. {
  6. /**
  7. * @Type("JMS\Serializer\Tests\Fixtures\Author")
  8. */
  9. private $author;
  10. /**
  11. * @Type("string")
  12. */
  13. private $text;
  14. public function __construct(Author $author = null, $text)
  15. {
  16. $this->author = $author;
  17. $this->text = $text;
  18. }
  19. public function getAuthor()
  20. {
  21. return $this->author;
  22. }
  23. }