GroupDummy.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Serializer\Tests\Fixtures;
  11. use Symfony\Component\Serializer\Annotation\Groups;
  12. /**
  13. * @author Kévin Dunglas <dunglas@gmail.com>
  14. */
  15. class GroupDummy extends GroupDummyParent implements GroupDummyInterface
  16. {
  17. /**
  18. * @Groups({"a"})
  19. */
  20. private $foo;
  21. /**
  22. * @Groups({"b", "c", "name_converter"})
  23. */
  24. protected $bar;
  25. private $fooBar;
  26. private $symfony;
  27. /**
  28. * @Groups({"b"})
  29. */
  30. public function setBar($bar)
  31. {
  32. $this->bar = $bar;
  33. }
  34. /**
  35. * @Groups({"c"})
  36. */
  37. public function getBar()
  38. {
  39. return $this->bar;
  40. }
  41. public function setFoo($foo)
  42. {
  43. $this->foo = $foo;
  44. }
  45. public function getFoo()
  46. {
  47. return $this->foo;
  48. }
  49. public function setFooBar($fooBar)
  50. {
  51. $this->fooBar = $fooBar;
  52. }
  53. /**
  54. * @Groups({"a", "b", "name_converter"})
  55. */
  56. public function isFooBar()
  57. {
  58. return $this->fooBar;
  59. }
  60. public function setSymfony($symfony)
  61. {
  62. $this->symfony = $symfony;
  63. }
  64. public function getSymfony()
  65. {
  66. return $this->symfony;
  67. }
  68. }