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 Forr instance

Return type:

Forr

addItem(ItemInterface ...$interface)

Add item(s)

Parameters:
Returns:

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

Return type:

Forr

withComment(string $comment)

Sets a comment for the Forr

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Forr with the comment

Return type:

Forr

withItem(ItemInterface ...$interface)

Set item(s)

Parameters:
Returns:

A new instance of Forr with the item(s)

Return type:

Forr