SequenceDiagram Class

class SequenceDiagram
addItem(ItemInterface ...$item)

Add item(s)

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

Returns:

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

Return type:

SequenceDiagram

addParticipant(Participant ...$participant)

Add participant(s)

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

Returns:

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

Return type:

SequenceDiagram

render(array $attributes = [])

Renders the Mermaid diagram

Parameters:
  • $attributes (array) – HTML attributes for the <pre> tag as name=>value pairs

Note

The mermaid class is added

Returns:

The Mermaid diagram code in a <pre> tag

Return type:

string

withComment(string $comment)

Sets a comment for the SequenceDiagram

Parameters:
  • $comment (string) – The comment

Returns:

A new instance of SequenceDiagram with the comment

Return type:

SequenceDiagram

withItem(ItemInterface ...$item)

Set item(s)

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

Returns:

A new instance of SequenceDiagram with the item(s)

Return type:

SequenceDiagram

withParticipant(Participant ...$participant)

Set participant(s)

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

Returns:

A new instance of SequenceDiagram with the participant(s)

Return type:

SequenceDiagram