Group Class

class Group

Represents a group of states and transitions that are concurrent with other groups

__construct()

Create a Group

Returns:

An instance of Group

Return type:

Group

addState(StateInterface ...$state)

Adds state(s)

Parameters:
Returns:

A new instance of State with the state(s) added

Return type:

State

addTransition(Transition ...$transition)

Adds transition(s)

Parameters:
  • ...$transition (Transition) – The transition(s)

Returns:

A new instance of State with the transition(s) added

Return type:

State

withComment(string $comment)

Set a comment

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of State with a comment

Return type:

State

withState(StateInterface ...$state)

Set state(s)

Parameters:
Returns:

A new instance of State with the state(s)

Return type:

State

withTransition(Transition ...$transition)

Sets transition(s)

Parameters:
  • ...$transition (Transition) – The transition(s)

Returns:

A new instance of State with the transition(s)

Return type:

State