1 | <?php |
||
12 | final class SubscriptionStateResolver implements StateResolverInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var FactoryInterface |
||
16 | */ |
||
17 | private $stateMachineFactory; |
||
18 | |||
19 | /** |
||
20 | * @param FactoryInterface $stateMachineFactory |
||
21 | */ |
||
22 | public function __construct(FactoryInterface $stateMachineFactory) |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | * |
||
30 | * @throws \SM\SMException |
||
31 | */ |
||
32 | public function resolve(SubscriptionInterface $subscription) |
||
44 | |||
45 | /** |
||
46 | * @param SubscriptionInterface $subscription |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | private function canSubscriptionBeFulfilled(SubscriptionInterface $subscription) |
||
54 | |||
55 | /** |
||
56 | * @param SubscriptionInterface $subscription |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | private function canSubscriptionBeCancelled(SubscriptionInterface $subscription) |
||
64 | } |
||
65 |