Forr Class¶
- class Forr¶
Represents a for loop
Implements
ItemInterface- __construct(string $condition)¶
Create a new Forr
- Parameters:
$condition (
string) – The loop condition
- Returns:
A new
Forrinstance- Return type:
- addItem(ItemInterface ...$interface)¶
Add item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Forrwith the item(s) added- Return type:
- withComment(string $comment)¶
Sets a comment for the Forr
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Forrwith the comment- Return type:
- withItem(ItemInterface ...$interface)¶
Set item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Forrwith the item(s)- Return type: