123456789101112131415161718192021222324252627 |
- <?php
- namespace JMS\SerializerBundle\Tests\Fixtures;
- use JMS\SerializerBundle\Annotation as Serializer;
- /** @Serializer\XmlRoot("price") */
- class CurrencyAwarePrice
- {
- /**
- * @Serializer\XmlAttribute
- * @Serializer\Type("string")
- */
- private $currency;
- /**
- * @Serializer\XmlValue
- * @Serializer\Type("double")
- */
- private $amount;
- public function __construct($amount, $currency = 'EUR')
- {
- $this->currency = $currency;
- $this->amount = $amount;
- }
- }
|