| 
				 public 
				
				
				 | 
			#
			__construct( integer $cart_name, Session$session )
				
Initializes the session cart 
				
Initializes the session cart Parameters
						$cart_nameinteger$cart_name The name of the cart to use in the session
$sessionSessionThe session object
 | 
		
			| 
				 public 
				
				
				 | 
			#
			setCallback( string $action, callable $callback )
				
Sets a callback to be invoked when the given $method is called. 
				
Sets a callback to be invoked when the given $method is called. Parameters
						$actionstring$action The action to invoke the callback on (supported actions: addItem,
updateItem, removeItem)
$callbackcallableThe callback to execute
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			get( )
				
Returns the cart Returns
						arrayAn array of cart info including 'items' and any thing else set for the cart
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			emptyCart( )
				
Empties the cart by removing all items from it 
				
Empties the cart by removing all items from it | 
		
			| 
				 public 
				
				
				 |  | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getItem( integer $index )
				
Returns an item in the cart at the given index 
				
Returns an item in the cart at the given index Parameters
						$indexinteger$index The index of the item to return
Returns
						mixedThe item or null otherwise
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addItem( mixed $item )
				
Adds an item to the cart Parameters
						$itemmixed$item The item to add to the cart
Returns
						integerThe index the item was added to
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			updateItem( integer $index, mixed $item )
				
Update an item in the cart 
				
Update an item in the cart Parameters
						$indexinteger$index The index to update
$itemmixed$item The item to update at the given index
 | 
		
			| 
				 public 
				
				
				 | 
			#
			removeItems( array $indexes )
				
Removes a set of items from the cart 
				
Removes a set of items from the cart Parameters
						$indexesarray$indexes A list of indexes matching the cart item indexes for items to remove
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			removeItem( integer $index )
				
Remove an item from the cart 
				
Remove an item from the cart Parameters
						$indexinteger$index The index of the item to remove from the cart
Returns
						mixedThe item removed or null otherwise
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			prequeueItem( mixed $item )
				
Allows an item to be modified before it is added to the cart 
				
Allows an item to be modified before it is added to the cart Parameters
						$itemmixed$item An item to add to the queue
Returns
						mixedUpdate $item content based on any triggered events
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			enqueue( mixed $item )
				
Adds an item to the queue 
				
Adds an item to the queue Parameters
						$itemmixed$item An item to add to the queue
Returns
						integerThe index of the queued item
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			dequeue( integer $index = 0 )
				
Removes and returns the first item from the queue 
				
Removes and returns the first item from the queue Parameters
						$indexinteger$index The index to dequeue
Returns
						mixedAn item from the queue, null if no items exist
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			checkQueue( integer $index = 0 )
				
Returns the first item from the queue without removing it 
				
Returns the first item from the queue without removing it Parameters
						$indexinteger$index The index to peek at
Returns
						mixedAn item from the queue, null if no items exist
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			isEmptyQueue( )
				
Returns whether or not the queue is empty 
				
Returns whether or not the queue is empty Returns
						booleantrue if the queue is empty, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			isEmptyCart( )
				
Returns whether or not the cart is empty 
				
Returns whether or not the cart is empty Returns
						booleantrue if the cart is empty, false otherwise
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			setData( mixed $field, mixed $value )
				
Sets a specified field into the cart with the given value 
				
Sets a specified field into the cart with the given value | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getData( string $field )
				
Returns a specified field from the cart 
				
Returns a specified field from the cart Parameters
						$fieldstring$field The field name to fetch
Returns
						mixedThe value stored in the cart at $field
 
 |