HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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;
}