SpecialOfferCollection
in package
implements
Countable, IteratorAggregate
Class SpecialOfferCollection
Interfaces, Classes and Traits
- Countable
- IteratorAggregate
Table of Contents
- $specialOffers : array<string|int, SpecialOfferInterface>
- __construct() : mixed
- SpecialOfferCollection constructor.
- collect() : SpecialOfferCollection
- Named constructor of special offer collection.
- count() : int
- Returns the count of all collection items.
- getArray() : array<string|int, SpecialOfferInterface>
- Returns the collection items.
- getIterator() : ArrayIterator|Traversable
- Returns the collection items as array iterator to loop through the collection.
- add() : mixed
- Adds a new item to the collection.
Properties
$specialOffers
protected
array<string|int, SpecialOfferInterface>
$specialOffers
= []
Methods
__construct()
SpecialOfferCollection constructor.
public
__construct(array<string|int, SpecialOfferInterface> $specialOffers) : mixed
Parameters
- $specialOffers : array<string|int, SpecialOfferInterface>
-
Special offer entities to be collected.
Return values
mixed —collect()
Named constructor of special offer collection.
public
static collect(array<string|int, SpecialOfferInterface> $specialOffers) : SpecialOfferCollection
Parameters
- $specialOffers : array<string|int, SpecialOfferInterface>
-
Special offer entities to be collected.
Return values
SpecialOfferCollection —New instance.
count()
Returns the count of all collection items.
public
count() : int
Return values
int —Count of all collection items.
getArray()
Returns the collection items.
public
getArray() : array<string|int, SpecialOfferInterface>
Return values
array<string|int, SpecialOfferInterface> —getIterator()
Returns the collection items as array iterator to loop through the collection.
public
getIterator() : ArrayIterator|Traversable
Return values
ArrayIterator|Traversable —add()
Adds a new item to the collection.
protected
add(SpecialOfferInterface $specialOffer) : mixed
Parameters
- $specialOffer : SpecialOfferInterface
-
Special offer to be added.