PersonCollection.php 622 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace JMS\SerializerBundle\Tests\Fixtures;
  3. use JMS\SerializerBundle\Annotation\XmlRoot;
  4. use JMS\SerializerBundle\Annotation\XmlList;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use JMS\SerializerBundle\Annotation\Type;
  7. /**
  8. * @XmlRoot("person_collection")
  9. */
  10. class PersonCollection
  11. {
  12. /**
  13. * @Type("ArrayCollection<JMS\SerializerBundle\Tests\Fixtures\Person>")
  14. * @XmlList(entry = "person", inline = true)
  15. */
  16. public $persons;
  17. /**
  18. * @Type("string")
  19. */
  20. public $location;
  21. public function __construct()
  22. {
  23. $this->persons = new ArrayCollection;
  24. }
  25. }