Box Class

class Box

Represents a box Block

__construct(?string $description = null, null|array|string $colour = null)

Create a new Box instance

Parameters:
  • $description (?string) – The description (default: no description)

  • $colour (null|array|string) –

    The box background colour (default: no colour - transparent)

    • array - RGB(A) where RGB values are 0 <= value <= 255, and A is 0 <= value <= 1

    • string - HTML colour

Returns:

A new instance of Box

Return type:

Box

addParticipant(Participant ...$participant)

Add participant(s)

Parameters:
  • ...$interface (ParticipantInterface) – The participant(s)

Returns:

A new instance of Box with the participant(s) added

Return type:

Box

withComment(string $comment)

Sets a comment for the Box

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Box with the comment

Return type:

Box

withParticipant(ParticipantInterface ...$participant)

Set participant(s)

Parameters:
  • ...$interface (ParticipantInterface) – The participant(s)

Returns:

A new instance of Box with the participant(s)

Return type:

Box