GitGraph Class¶
- class GitGraph¶
Represents a GitGraph diagram
- addItem(ItemInterface ...$item)¶
Add item(s)
- Parameters:
...$item (
ItemInterface) – The item(s)
- Returns:
A new instance of
GitGraphwith the item(s) added- Return type:
- render(array $attributes = [])¶
Renders the diagram
- Parameters:
$attributes (
array) –HTML attributes for the <pre> tag as name=>value pairs
Note
The mermaid class is added
- Returns:
Mermaid diagram code in a <pre> tag
- Return type:
string
- withComment(string $comment)¶
Add a comment
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
GitGraphwith the comment- Return type: