| 1 | <?php |
||
| 22 | class Product implements ProductInterface |
||
| 23 | { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The name of the product. |
||
| 27 | * |
||
| 28 | * @ODM\String |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $name; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * The product number |
||
| 35 | * |
||
| 36 | * @ODM\String |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | protected $productNumber; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * The price |
||
| 43 | * |
||
| 44 | * @ODM\Field(type="float") |
||
| 45 | * @var float |
||
| 46 | */ |
||
| 47 | protected $price = 0; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * The quantity |
||
| 51 | * |
||
| 52 | * @ODM\Field(type="int") |
||
| 53 | * @var int |
||
| 54 | */ |
||
| 55 | protected $quantity = 1; |
||
| 56 | |||
| 57 | public function setName($name) |
||
| 63 | |||
| 64 | public function getName() |
||
| 68 | |||
| 69 | public function setPrice($price) |
||
| 75 | |||
| 76 | public function getPrice() |
||
| 80 | |||
| 81 | public function setProductNumber($number) |
||
| 87 | |||
| 88 | public function getProductNumber() |
||
| 92 | |||
| 93 | public function setQuantity($quantity) |
||
| 99 | |||
| 100 | public function getQuantity() |
||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | } |