CartInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Checkout\Model\Cart;
  7. use Magento\Quote\Model\Quote;
  8. /**
  9. * Shopping cart interface
  10. *
  11. * @api
  12. * @author Magento Core Team <core@magentocommerce.com>
  13. * @deprecated 100.1.0 Use \Magento\Quote\Api\Data\CartInterface instead
  14. * @see \Magento\Quote\Api\Data\CartInterface
  15. * @since 100.0.2
  16. */
  17. interface CartInterface
  18. {
  19. /**
  20. * Add product to shopping cart (quote)
  21. *
  22. * @param int|\Magento\Catalog\Model\Product $productInfo
  23. * @param array|float|int|\Magento\Framework\DataObject|null $requestInfo
  24. * @return $this
  25. */
  26. public function addProduct($productInfo, $requestInfo = null);
  27. /**
  28. * Save cart
  29. *
  30. * @return $this
  31. * @abstract
  32. */
  33. public function saveQuote();
  34. /**
  35. * Associate quote with the cart
  36. *
  37. * @param Quote $quote
  38. * @return $this
  39. * @abstract
  40. */
  41. public function setQuote(Quote $quote);
  42. /**
  43. * Get quote object associated with cart
  44. *
  45. * @return Quote
  46. * @abstract
  47. */
  48. public function getQuote();
  49. }