Open Journal Systems  3.3.0
Omnipay\Common\ItemBag Class Reference
Inheritance diagram for Omnipay\Common\ItemBag:
Omnipay\PayPal\PayPalItemBag

Public Member Functions

 __construct (array $items=array())
 
 __construct (array $items=array())
 
 add ($item)
 
 add ($item)
 
 all ()
 
 all ()
 
 count ()
 
 count ()
 
 getIterator ()
 
 getIterator ()
 
 replace (array $items=array())
 
 replace (array $items=array())
 

Protected Attributes

 $items
 

Detailed Description

Cart Item Bag

This class defines a bag (multi element set or array) of single cart items in the Omnipay system.

See also
Item

Cart Item Bag

This class defines a bag (multi element set or array) of single cart items in the Omnipay system.

Definition at line 16 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

Omnipay\Common\ItemBag::__construct ( array  $items = array())

Constructor

Parameters
array$itemsAn array of items

Definition at line 35 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

References Omnipay\Common\ItemBag\$items, and Omnipay\Common\ItemBag\replace().

◆ __construct() [2/2]

Omnipay\Common\ItemBag::__construct ( array  $items = array())

Constructor

Parameters
array$itemsAn array of items

Definition at line 33 of file vendor/omnipay/common/src/Common/ItemBag.php.

References Omnipay\Common\ItemBag\replace().

Member Function Documentation

◆ add() [1/2]

Omnipay\Common\ItemBag::add (   $item)

Add an item to the bag

Parameters
ItemInterface | array$itemAn existing item, or associative array of item parameters

Reimplemented in Omnipay\PayPal\PayPalItemBag, and Omnipay\PayPal\PayPalItemBag.

Definition at line 70 of file vendor/omnipay/common/src/Common/ItemBag.php.

◆ add() [2/2]

Omnipay\Common\ItemBag::add (   $item)

Add an item to the bag

See also
Item
Parameters
ItemInterface | array$itemAn existing item, or associative array of item parameters

Reimplemented in Omnipay\PayPal\PayPalItemBag, and Omnipay\PayPal\PayPalItemBag.

Definition at line 75 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

Referenced by Omnipay\Common\ItemBag\replace(), and Omnipay\Common\Message\AbstractRequestTest\testItemsBag().

◆ all() [1/2]

Omnipay\Common\ItemBag::all ( )

Return all the items

Returns
array An array of items

Definition at line 44 of file vendor/omnipay/common/src/Common/ItemBag.php.

References Omnipay\Common\ItemBag\$items.

◆ all() [2/2]

Omnipay\Common\ItemBag::all ( )

Return all the items

See also
Item
Returns
array An array of items

Definition at line 47 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

References Omnipay\Common\ItemBag\$items.

◆ count() [1/2]

Omnipay\Common\ItemBag::count ( )

Returns the number of items

Returns
int The number of items

Definition at line 94 of file vendor/omnipay/common/src/Common/ItemBag.php.

References Omnipay\Common\ItemBag\count().

◆ count() [2/2]

Omnipay\Common\ItemBag::count ( )

Returns the number of items

Returns
int The number of items

Definition at line 99 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

Referenced by Omnipay\Common\ItemBag\count().

◆ getIterator() [1/2]

Omnipay\Common\ItemBag::getIterator ( )

Returns an iterator for items

Returns
\ArrayIterator An \ArrayIterator instance

Definition at line 84 of file vendor/omnipay/common/src/Common/ItemBag.php.

◆ getIterator() [2/2]

Omnipay\Common\ItemBag::getIterator ( )

Returns an iterator for items

Returns
\ArrayIterator An \ArrayIterator instance

Definition at line 89 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

◆ replace() [1/2]

Omnipay\Common\ItemBag::replace ( array  $items = array())

Replace the contents of this bag with the specified items

Parameters
array$itemsAn array of items

Definition at line 55 of file vendor/omnipay/common/src/Common/ItemBag.php.

References Omnipay\Common\ItemBag\$items, and Omnipay\Common\ItemBag\add().

◆ replace() [2/2]

Omnipay\Common\ItemBag::replace ( array  $items = array())

Replace the contents of this bag with the specified items

See also
Item
Parameters
array$itemsAn array of items

Definition at line 59 of file lib/vendor/omnipay/common/src/Omnipay/Common/ItemBag.php.

References Omnipay\Common\ItemBag\$items, and Omnipay\Common\ItemBag\add().

Referenced by Omnipay\Common\ItemBag\__construct().

Field Documentation

◆ $items

array Omnipay\Common\ItemBag::$items
protected

The documentation for this class was generated from the following file: