SpecialOfferCollection

Implements \Countable, \IteratorAggregate

Class SpecialOfferCollection

package

Default

Methods

SpecialOfferCollection constructor.

__construct(array<mixed,\SpecialOfferInterface> $specialOffers) 

Arguments

$specialOffers

array<mixed,\SpecialOfferInterface>

Special offer entities to be collected.

Adds a new item to the collection.

add(\SpecialOfferInterface $specialOffer) 

Arguments

$specialOffer

\SpecialOfferInterface

Special offer to be added.

Named constructor of special offer collection.

collect(array<mixed,\SpecialOfferInterface> $specialOffers) : \SpecialOfferCollection
static

Arguments

$specialOffers

array<mixed,\SpecialOfferInterface>

Special offer entities to be collected.

Response

\SpecialOfferCollection

New instance.

Returns the count of all collection items.

count() : integer

Response

integer

Count of all collection items.

Returns the collection items.

getArray() : array<mixed,\SpecialOfferInterface>

Response

array<mixed,\SpecialOfferInterface>

Returns the collection items as array iterator to loop through the collection.

getIterator() : \ArrayIterator|\Traversable

Response

\ArrayIterator|\Traversable

Properties

specialOffers

specialOffers : array<mixed,\SpecialOfferInterface>
var

Type(s)

array<mixed,\SpecialOfferInterface>