Interface

TRex\Core\IObjectsModifier

interface IObjectsModifier

Interface IObjectsModifier

Methods

IObjects extract(int $startIndex, int $length, bool $areKeysPreserved = true)

Extracts the sequence of elements.

IObjects each(Closure $callback)

Executes the callback for every value.

IObjects filter(Closure $callback = null)

Executes the callback for every value.

Details

at line 21
public IObjects extract(int $startIndex, int $length, bool $areKeysPreserved = true)

Extracts the sequence of elements.

Starts at index $startIndex and stop after $length keys.

Parameters

int $startIndex
int $length
bool $areKeysPreserved

Return Value

IObjects

at line 30
public IObjects each(Closure $callback)

Executes the callback for every value.

Returns an IObjects with the result of each callback call.

Parameters

Closure $callback

Return Value

IObjects

at line 40
public IObjects filter(Closure $callback = null)

Executes the callback for every value.

Returns an IObjects with the value of which callback has return true. If no callback is passed, filters on the value itself.

Parameters

Closure $callback

Return Value

IObjects