-
Notifications
You must be signed in to change notification settings - Fork 21
/
ItemInterface.php
55 lines (41 loc) · 911 Bytes
/
ItemInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @link https://www.github.com/hscstudio/yii2-cart
* @copyright Copyright (c) 2016 HafidMukhlasin.com
* @license http://www.yiiframework.com/license/
*/
namespace hscstudio\cart;
/**
* Interface ItemInterface
* @property int $price
* @property int $cost
* @property string $id
* @property int $quantity
* @package \hscsstudio\cart
*/
interface ItemInterface
{
/** Triggered on cost calculation */
const EVENT_COST_CALCULATION = 'costCalculation';
/**
* @return integer
*/
public function getPrice();
/**
* @return string
*/
public function getId();
/**
* @param bool $withDiscount
* @return integer
*/
public function getCost($withDiscount = true);
/**
* @param int $quantity
*/
public function setQuantity($quantity);
/**
* @return int
*/
public function getQuantity();
}