class Manager

Class Manager

Methods

Cart[]
getCarts( User $user)

get all carts for a specific user

null
getByName($name, User $user)

get a cart by its name

deleteCart( Cart $cart)

delete a specific cart

setSessionCart( Cart $cart)

No description

Cart|null
getSessionCart()

get session cart

createCart( string $name = 'default', User $user = null, Shop $shop = null, Currency $currency = null, boolean $persist = false)

create a new cart for a user

persistCart( Cart $cart)

Persists a cart in the db

Details

at line line 43
Cart[] getCarts( User $user)

get all carts for a specific user

Parameters

User $user

Return Value

Cart[]

at line line 59
null getByName($name, User $user)

get a cart by its name

Parameters

$name
User $user

Return Value

null

at line line 79
deleteCart( Cart $cart)

delete a specific cart

Parameters

Cart $cart

at line line 87
setSessionCart( Cart $cart)

Parameters

Cart $cart

at line line 100
Cart|null getSessionCart()

get session cart

Return Value

Cart|null

at line line 127
Cart createCart( string $name = 'default', User $user = null, Shop $shop = null, Currency $currency = null, boolean $persist = false)

create a new cart for a user

Parameters

string $name
User $user
Shop $shop
Currency $currency
boolean $persist

Return Value

Cart

at line line 154
persistCart( Cart $cart)

Persists a cart in the db

Parameters

Cart $cart