SimpleObject.php 599 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace JMS\Serializer\Tests\Fixtures;
  3. use JMS\Serializer\Annotation\SerializedName;
  4. use JMS\Serializer\Annotation\Type;
  5. class SimpleObject
  6. {
  7. /** @Type("string") */
  8. private $foo;
  9. /**
  10. * @SerializedName("moo")
  11. * @Type("string")
  12. */
  13. private $bar;
  14. /** @Type("string") */
  15. protected $camelCase = 'boo';
  16. public function __construct($foo, $bar)
  17. {
  18. $this->foo = $foo;
  19. $this->bar = $bar;
  20. }
  21. public function getFoo()
  22. {
  23. return $this->foo;
  24. }
  25. public function getBar()
  26. {
  27. return $this->bar;
  28. }
  29. }