vendor/sylius/sylius/src/Sylius/Bundle/OrderBundle/Controller/AddToCartCommand.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\OrderBundle\Controller;
  12. use Sylius\Component\Order\Model\OrderInterface;
  13. use Sylius\Component\Order\Model\OrderItemInterface;
  14. final class AddToCartCommand implements AddToCartCommandInterface
  15. {
  16.     private OrderInterface $cart;
  17.     private OrderItemInterface $cartItem;
  18.     public function __construct(OrderInterface $cartOrderItemInterface $cartItem)
  19.     {
  20.         $this->cart $cart;
  21.         $this->cartItem $cartItem;
  22.     }
  23.     public function getCart(): OrderInterface
  24.     {
  25.         return $this->cart;
  26.     }
  27.     public function getCartItem(): OrderItemInterface
  28.     {
  29.         return $this->cartItem;
  30.     }
  31. }