Order.php 376 B

123456789101112131415161718
  1. <?php
  2. namespace JMS\SerializerBundle\Tests\Fixtures;
  3. use JMS\SerializerBundle\Annotation\XmlRoot;
  4. use JMS\SerializerBundle\Annotation\Type;
  5. /** @XmlRoot("order") */
  6. class Order
  7. {
  8. /** @Type("JMS\SerializerBundle\Tests\Fixtures\Price") */
  9. private $cost;
  10. public function __construct(Price $price = null)
  11. {
  12. $this->cost = $price ?: new Price(5);
  13. }
  14. }