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