class Waybills implements ArrayAccess, Countable, IteratorAggregate (View source)

Methods

__construct(array $container = [])

Constructs a new instance

add(Waybill|array $waybill)

Adds a Waybill object to the container

write()

Run write() method on the container

int
count()

Get the count of container elements

array
toArray(int $count = 1)

Get the iterator for the container

void
offsetSet($offset, $value)

{@inheritdoc}

bool
offsetExists($offset)

{@inheritdoc}

void
offsetUnset($offset)

{@inheritdoc}

mixed
offsetGet($offset)

{@inheritdoc}

getIterator()

{@inheritdoc}

static Waybills
make(array|null $waybills = [])

Instance factory method

Details

__construct(array $container = [])

Constructs a new instance

Parameters

array $container

The container

Waybills add(Waybill|array $waybill)

Adds a Waybill object to the container

Parameters

Waybill|array $waybill

a Waybill object

Return Value

Waybills

The method returns the instance

Waybills write()

Run write() method on the container

Return Value

Waybills

The method returns the instance

int count()

Get the count of container elements

Return Value

int

The method returns the count of container elements

array toArray(int $count = 1)

Get the iterator for the container

Parameters

int $count

The count of write operations

Return Value

array

The method returns combining with all waybill's array

void offsetSet($offset, $value)

{@inheritdoc}

Parameters

$offset
$value

Return Value

void

bool offsetExists($offset)

{@inheritdoc}

Parameters

$offset

Return Value

bool

void offsetUnset($offset)

{@inheritdoc}

Parameters

$offset

Return Value

void

mixed offsetGet($offset)

{@inheritdoc}

Parameters

$offset

Return Value

mixed

Traversable getIterator()

{@inheritdoc}

Return Value

Traversable

static Waybills make(array|null $waybills = [])

Instance factory method

Parameters

array|null $waybills

An array of waybills

Return Value

Waybills

The method returns a new instance