123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace JMS\SerializerBundle\Tests\Fixtures;
- use JMS\SerializerBundle\Annotation\AccessType;
- use JMS\SerializerBundle\Annotation\Type;
- use JMS\SerializerBundle\Annotation\ReadOnly;
- /** @AccessType("public_method") */
- class GetSetObject
- {
- /** @AccessType("property") @Type("integer") */
- private $id = 1;
- /** @Type("string") */
- private $name = 'Foo';
- /**
- * @ReadOnly
- */
- private $readOnlyProperty = 42;
- public function getId()
- {
- throw new \RuntimeException('This should not be called.');
- }
- public function getName()
- {
- return 'Johannes';
- }
- public function setName($name)
- {
- $this->name = $name;
- }
- public function getReadOnlyProperty()
- {
- return $this->readOnlyProperty;
- }
- }
|