1 | <?php |
||
28 | class EnumPrice extends AbstractPrice |
||
29 | { |
||
30 | /** |
||
31 | * @var UnitInterface |
||
32 | */ |
||
33 | protected $unit; |
||
34 | |||
35 | /** |
||
36 | * @var Currency |
||
37 | */ |
||
38 | protected $currency; |
||
39 | |||
40 | /** |
||
41 | * @var array quantity => total sum for the quantity |
||
42 | */ |
||
43 | protected $sums; |
||
44 | |||
45 | 2 | public function __construct( |
|
58 | |||
59 | 1 | public function getUnit() |
|
63 | |||
64 | 1 | public function getCurrency() |
|
68 | |||
69 | 1 | public function getSums() |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 2 | public function calculateSum(QuantityInterface $quantity) |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function calculatePrice(QuantityInterface $quantity) |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 2 | public function calculateUsage(QuantityInterface $quantity) |
|
115 | } |
||
116 |