FrontendSession.php 854 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Signifyd\Model\QuoteSession;
  7. use Magento\Checkout\Model\Session as CheckoutSession;
  8. /**
  9. * Implementation of QuoteSessionInterface for Magento frontend checkout.
  10. */
  11. class FrontendSession implements QuoteSessionInterface
  12. {
  13. /**
  14. * @var CheckoutSession
  15. */
  16. private $checkoutSession;
  17. /**
  18. * FrontendSession constructor.
  19. *
  20. * Class uses checkout session for retrieving quote.
  21. *
  22. * @param CheckoutSession $checkoutSession
  23. */
  24. public function __construct(CheckoutSession $checkoutSession)
  25. {
  26. $this->checkoutSession = $checkoutSession;
  27. }
  28. /**
  29. * @inheritdoc
  30. */
  31. public function getQuote()
  32. {
  33. return $this->checkoutSession->getQuote();
  34. }
  35. }