MinimalShoppingCartService
in package
implements
ShoppingCartServiceInterface
Class MinimalShoppingCartService
Interfaces, Classes and Traits
- ShoppingCartServiceInterface
- Interface ShoppingCartServiceInterface
Table of Contents
- $db : CI_DB_query_builder
- __construct() : mixed
- MinimalShoppingCartService constructor.
- deleteShoppingCartsByCustomerId() : mixed
- Deletes all shopping carts from DB by a given customer ID.
- getShoppingCartsByCustomerId() : ShoppingCartCollection
- Gets a collection of all shopping carts by a given customer ID.
- createSharedShoppingCartFromArray() : bool|ShoppingCart
- Creates a shopping cart instance from an array.
Properties
$db
protected
CI_DB_query_builder
$db
Methods
__construct()
MinimalShoppingCartService constructor.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
Return values
mixed —deleteShoppingCartsByCustomerId()
Deletes all shopping carts from DB by a given customer ID.
public
deleteShoppingCartsByCustomerId(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Return values
mixed —getShoppingCartsByCustomerId()
Gets a collection of all shopping carts by a given customer ID.
public
getShoppingCartsByCustomerId(IdType $customerId) : ShoppingCartCollection
Parameters
- $customerId : IdType
Return values
ShoppingCartCollection —createSharedShoppingCartFromArray()
Creates a shopping cart instance from an array.
protected
createSharedShoppingCartFromArray(array<string|int, mixed> $rawShoppingCart) : bool|ShoppingCart
Parameters
- $rawShoppingCart : array<string|int, mixed>