ParcelServiceCollection
in package
implements
Countable, IteratorAggregate
Class ParcelServiceCollection
Interfaces, Classes and Traits
- Countable
- IteratorAggregate
Table of Contents
- $parcelServices : array<string|int, mixed>
- __construct() : mixed
- ParcelServiceCollection constructor.
- collect() : ParcelServiceCollection
- Returns a ParcelServiceCollection containing given parcel services.
- count() : int
- Returns the count of parcel services in the collection.
- getArray() : array<string|int, mixed>
- Returns the collection as an array.
- getIterator() : ArrayIterator|Traversable
- add() : mixed
- Adds a parcel service to the collection.
Properties
$parcelServices
private
array<string|int, mixed>
$parcelServices
= []
Methods
__construct()
ParcelServiceCollection constructor.
public
__construct(array<string|int, mixed> $parcelServices) : mixed
Parameters
- $parcelServices : array<string|int, mixed>
Return values
mixed —collect()
Returns a ParcelServiceCollection containing given parcel services.
public
static collect(array<string|int, mixed> $parcelServices) : ParcelServiceCollection
Parameters
- $parcelServices : array<string|int, mixed>
Return values
ParcelServiceCollection —count()
Returns the count of parcel services in the collection.
public
count() : int
Return values
int —getArray()
Returns the collection as an array.
public
getArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getIterator()
public
getIterator() : ArrayIterator|Traversable
Return values
ArrayIterator|Traversable —add()
Adds a parcel service to the collection.
protected
add(ParcelServiceInterface $parcelService) : mixed
Parameters
- $parcelService : ParcelServiceInterface