Section Class

class Section

Represents a Section for Timeline

__construct(string $label)

Creates a new Section

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

Returns:

A Section instance

Return type:

Section

addPeriod(Period ...$period)

Add period(s)

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

Returns:

A new instance of Section with the period(s) added

Return type:

Section

withComment(string $comment)

Set a comment

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of Section with the comment

Return type:

Section

withPeriod(Period ...$period)

Set period(s)

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

Returns:

A new instance of Section with the period(s)

Return type:

Section