Tryy Class

class Tryy

Represents a try clause in a TryCatch object

__construct()

Create a new Tryy

Returns:

A new Tryy instance

Return type:

Tryy

addItem(ItemInterface ...$item)

Add items to the Tryy section

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

Returns:

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

Return type:

Tryy

withComment(string $comment)

Set a comment for the Tryy

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Tryy with the comment

Return type:

Tryy

withItem(ItemInterface ...$item)

Set the Tryy section items

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

Returns:

A new instance of Tryy with the item(s)

Return type:

Tryy