Loop Class

class Loop

Represents a loop

Implements ItemInterface

__construct(string $condition)

Create a new Loop

Parameters:
  • $condition (string) – The loop condition

Returns:

A new Loop instance

Return type:

Loop

addItem(ItemInterface ...$interface)

Add item(s)

Parameters:
Returns:

A new instance of Loop with the item(s) added

Return type:

Loop

withComment(string $comment)

Set a comment for the Loop

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Loop with the comment

Return type:

Loop

withItem(ItemInterface ...$interface)

Set item(s)

Parameters:
Returns:

A new instance of Loop with the item(s)

Return type:

Loop