ObjectWithXmlKeyValuePairs.php 576 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace JMS\SerializerBundle\Tests\Fixtures;
  3. use JMS\SerializerBundle\Annotation\XmlKeyValuePairs;
  4. class ObjectWithXmlKeyValuePairs
  5. {
  6. /**
  7. * @var array
  8. * @XmlKeyValuePairs
  9. */
  10. private $array = array(
  11. 'key-one' => 'foo',
  12. 'key-two' => 1,
  13. 'nested-array' => array(
  14. 'bar' => 'foo',
  15. ),
  16. 'without-keys' => array(
  17. 1,
  18. 'test'
  19. ),
  20. 'mixed' => array(
  21. 'test',
  22. 'foo' => 'bar',
  23. '1_foo' => 'bar'
  24. ),
  25. 1 => 'foo'
  26. );
  27. }