File: D:/HostingSpaces/SBogers10/structura.komma.pro/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;
use App\KommaApp\Shop\Products\ProductableInterface;
/**
* 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 ProductableInterface
*/
public function getProductable(): ProductableInterface;
/**
* @param ProductableInterface $productable
* @return ShoppingCartItemInterface
*/
public function setProductable(ProductableInterface $productable): 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;
}