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
Loopinstance- Return type:
- addItem(ItemInterface ...$interface)¶
Add item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Loopwith the item(s) added- Return type:
- withComment(string $comment)¶
Set a comment for the Loop
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Loopwith the comment- Return type:
- withItem(ItemInterface ...$interface)¶
Set item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Loopwith the item(s)- Return type: