File: D:/HostingSpaces/Lacom/lacom.nl/app/KommaApp/Shop/Cart/ShoppingCartItemInterface.php
<?php
/**
* Created by PhpStorm.
* User: julesgraus
* Date: 08/02/2018
* Time: 13:25
*/
namespace App\KommaApp\Shop\Cart;
use App\KommaApp\Shop\Discounts\DiscountableInterface;
use App\KommaApp\Shop\Products\Product\Product;
/**
* Represents an item that can be put in the shopping cart.
* This is simply a product coupled with an amount and a price modification.
*
* Class ShoppingCartItem
* @package App\KommaApp\Shop\Cart
*/
interface ShoppingCartItemInterface extends DiscountableInterface
{
/**
* @return Product
*/
public function getProduct(): Product;
/**
* @param Product $product
* @return ShoppingCartItemInterface
*/
public function setProduct(Product $product): ShoppingCartItemInterface;
/**
* @return int
*/
public function getAmount(): int;
/**
* @param int $amount
* @return ShoppingCartItemInterface
*/
public function setAmount(int $amount): ShoppingCartItemInterface;
/**
* Returns the price total
* @param bool $includeDiscounts
* @return float
*/
public function getTotal(bool $includeDiscounts = true): float;
}