| 1 | <?php |
||
| 20 | class CustomerContext implements CustomerContextInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var TokenStorageInterface |
||
| 24 | */ |
||
| 25 | private $tokenStorage; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var AuthorizationCheckerInterface |
||
| 29 | */ |
||
| 30 | private $authorizationChecker; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param TokenStorageInterface $tokenStorage |
||
| 34 | * @param AuthorizationCheckerInterface $authorizationChecker |
||
| 35 | */ |
||
| 36 | public function __construct(TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Gets customer based on currently logged user. |
||
| 44 | * |
||
| 45 | * @return CustomerInterface|null |
||
| 46 | */ |
||
| 47 | public function getCustomer(): ?CustomerInterface |
||
| 59 | } |
||
| 60 |