Author.php 528 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace JMS\Serializer\Tests\Fixtures\DoctrinePHPCR;
  3. use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM;
  4. use JMS\Serializer\Annotation\SerializedName;
  5. /** @PHPCRODM\Document */
  6. class Author
  7. {
  8. /**
  9. * @PHPCRODM\Id()
  10. */
  11. protected $id;
  12. /**
  13. * @PHPCRODM\Field(type="string")
  14. * @SerializedName("full_name")
  15. */
  16. private $name;
  17. public function __construct($name)
  18. {
  19. $this->name = $name;
  20. }
  21. public function getName()
  22. {
  23. return $this->name;
  24. }
  25. }