1 | <?php |
||
23 | class UsePointProcessor implements ItemHolderProcessor |
||
24 | { |
||
25 | /** |
||
26 | * @Inject("orm.em") |
||
27 | * @var EntityManager |
||
28 | */ |
||
29 | protected $entityManager; |
||
30 | |||
31 | /** |
||
32 | * @var BaseInfo |
||
33 | */ |
||
34 | protected $BaseInfo; |
||
35 | |||
36 | /** |
||
37 | * DeliveryFeeProcessor constructor. |
||
38 | * |
||
39 | * @param $app |
||
40 | */ |
||
41 | public function __construct(EntityManager $entityManager, BaseInfo $BaseInfo) |
||
46 | |||
47 | /** |
||
48 | * @param ItemHolderInterface $itemHolder |
||
49 | * @param PurchaseContext $context |
||
50 | * |
||
51 | * @return ProcessResult |
||
52 | */ |
||
53 | public function process(ItemHolderInterface $itemHolder, PurchaseContext $context) |
||
68 | |||
69 | /** |
||
70 | * 明細追加処理 |
||
71 | * |
||
72 | * @param ItemHolderInterface $itemHolder |
||
73 | */ |
||
74 | protected function addPointDiscountItem(ItemHolderInterface $itemHolder) |
||
106 | |||
107 | /** |
||
108 | * 既存のポイント明細を削除する. |
||
109 | * |
||
110 | * @param ItemHolderInterface $itemHolder |
||
111 | */ |
||
112 | protected function removePointDiscountItem(ItemHolderInterface $itemHolder) |
||
121 | |||
122 | /** |
||
123 | * 利用ポイントを単価に換算する. |
||
124 | * |
||
125 | * @param integer $usePoint 利用ポイント |
||
126 | * @return integer |
||
127 | */ |
||
128 | protected function usePointToPrice($usePoint) |
||
132 | } |
||
133 |