Publisher.php 685 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace JMS\Serializer\Tests\Fixtures;
  3. use JMS\Serializer\Annotation\SerializedName;
  4. use JMS\Serializer\Annotation\Type;
  5. use JMS\Serializer\Annotation\XmlElement;
  6. use JMS\Serializer\Annotation\XmlNamespace;
  7. use JMS\Serializer\Annotation\XmlRoot;
  8. /**
  9. * @XmlRoot("publisher")
  10. * @XmlNamespace(uri="http://example.com/namespace2", prefix="ns2")
  11. */
  12. class Publisher
  13. {
  14. /**
  15. * @Type("string")
  16. * @XmlElement(namespace="http://example.com/namespace2")
  17. * @SerializedName("pub_name")
  18. */
  19. private $name;
  20. public function __construct($name)
  21. {
  22. $this->name = $name;
  23. }
  24. public function getName()
  25. {
  26. return $this->name;
  27. }
  28. }