trait ManagesLoops

Properties

protected array $loopsStack

The stack of in-progress loops.

Methods

void
addLoop(Countable|array $data)

Add new loop to the stack.

void
incrementLoopIndices()

Increment the top loop's indices.

void
popLoop()

Pop a loop from the top of the loop stack.

stdClass|null
getLastLoop()

Get an instance of the last loop in the stack.

array
getLoopStack()

Get the entire loop stack.

Details

at line 23
void addLoop(Countable|array $data)

Add new loop to the stack.

Parameters

Countable|array $data

Return Value

void

at line 46
void incrementLoopIndices()

Increment the top loop's indices.

Return Value

void

at line 64
void popLoop()

Pop a loop from the top of the loop stack.

Return Value

void

at line 74
stdClass|null getLastLoop()

Get an instance of the last loop in the stack.

Return Value

stdClass|null

at line 86
array getLoopStack()

Get the entire loop stack.

Return Value

array