Iff Class¶
- class Iff¶
Represents an if block of conditional statements
Implements
ItemInterface- __construct(string $condition)¶
Create a new Iff conditional group of statements
- Parameters:
$condition (
string) – The condition
- Returns:
A new instance of
Iff- Return type:
- addElse(Elsee ...$else)¶
Add Elsee group(s)
- addItem(ItemInterface ...$interface)¶
Add item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Iffwith the item(s) added- Return type:
- withComment(string $comment)¶
Set a comment for the Iff
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Iffwith the comment- Return type:
- withElse(Elsee ...$else)¶
Set Elsee group(s)
- withItem(ItemInterface ...$interface)¶
Set item(s)
- Parameters:
...$interface (
ItemInterface) – The item(s)
- Returns:
A new instance of
Iffwith the item(s)- Return type: