Period Class

class Period

Represents a Period for Section or Timeline

__construct(string $label)

Creates a new Period

Parameters:
  • $label (string) – The period label

Returns:

A Period instance

Return type:

Period

addEvent(string ...$event)

Add event(s)

Parameters:
  • ...$event (Period) – The event(s)

Returns:

A new instance of Period with the event(s) added

Return type:

Period

withComment(string $comment)

Set a comment

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Period with the comment

Return type:

Period

withEvent(string ...$event)

Set event(s)

Parameters:
  • ...$event (Period) – The event(s)

Returns:

A new instance of Period with the event(s)

Return type:

Period