ObjectWithEmptyArrayAndHash.php 561 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace JMS\Serializer\Tests\Fixtures;
  3. use JMS\Serializer\Annotation as Serializer;
  4. class ObjectWithEmptyArrayAndHash
  5. {
  6. /**
  7. * @Serializer\Type("array<string,string>")
  8. * @Serializer\SkipWhenEmpty()
  9. */
  10. private $hash = array();
  11. /**
  12. * @Serializer\Type("array<string>")
  13. * @Serializer\SkipWhenEmpty()
  14. */
  15. private $array = array();
  16. /**
  17. * @Serializer\SkipWhenEmpty()
  18. */
  19. private $object = array();
  20. public function __construct()
  21. {
  22. $this->object = new InlineChildEmpty();
  23. }
  24. }