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:

Iff

addElse(Elsee ...$else)

Add Elsee group(s)

Parameters:
  • ...$else (Elsee) – The else group(s)

Returns:

A new instance of Iff with the Elsee group(s) added

Return type:

Iff

addItem(ItemInterface ...$interface)

Add item(s)

Parameters:
Returns:

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

Return type:

Iff

withComment(string $comment)

Set a comment for the Iff

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Iff with the comment

Return type:

Iff

withElse(Elsee ...$else)

Set Elsee group(s)

Parameters:
  • ...$else (Elsee) – The else group(s)

Returns:

A new instance of Iff with the Elsee group(s)

Return type:

Iff

withItem(ItemInterface ...$interface)

Set item(s)

Parameters:
Returns:

A new instance of Iff with the item(s)

Return type:

Iff