메소드 |
설명 |
|
__construct ( string $id, Cart\Storage\Store $store ) |
Create a new cart instance. |
|
add ( cart\CartItem $cartItem ) |
Add an item to the cart. |
|
all ( ) : cart\CartItem[] |
Retrieve all of the items in the cart. |
|
clear ( ) |
Remove all items from the cart. |
|
find ( string $itemId ) : cart\CartItem | null |
Find an item in the cart. |
|
get ( string $itemId ) : cart\CartItem | null |
Retrieve an item from the cart by its id. |
|
getId ( ) : string |
Retrieve the cart id. |
|
getStore ( ) : Cart\Storage\Store |
Retrieve the cart storage implementation. |
|
has ( string $itemId ) : boolean |
Determine if an item exists in the cart. |
|
remove ( string $itemId ) |
Remove an item from the cart. |
|
restore ( ) |
Restore the cart from its saved state. |
|
save ( ) |
Save the cart state. |
|
tax ( ) : float |
Get the cart tax. |
|
toArray ( ) : array |
Export the cart as an array. |
|
total ( ) : float |
Get the cart total including tax. |
|
totalExcludingTax ( ) : float |
Get the cart total excluding tax. |
|
totalItems ( ) : integer |
Get the total number of items in the cart. |
|
totalUniqueItems ( ) : integer |
Get the total number of unique items in the cart. |
|
update ( string $itemId, string $key, mixed $value ) : string |
Update an item in the cart. |
|