Author.php 547 B

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