Whilee Class

class Whilee

Represents a while loop

Implements ItemInterface

__construct(string $condition)

Create a new Whilee

Parameters:
  • $condition (string) – The loop condition

Returns:

A new Whilee instance

Return type:

Whilee

addItem(ItemInterface ...$item)

Add items to the Whilee section

Parameters:
  • ...$item (string ItemInterface) – The item(s)

Returns:

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

Return type:

Whilee

withComment(string $comment)

Set a comment for the Whilee

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Whilee with the comment

Return type:

Whilee

withItem(ItemInterface ...$item)

Set the Whilee section items

Parameters:
  • ...$item (string ItemInterface) – The item(s)

Returns:

A new instance of Whilee with the item(s)

Return type:

Whilee