libSmalldb
v2.0.2
|
Public Member Functions | |
getRootGraph () | |
getNodes () | |
Get all nodes in the graph. More... | |
getEdges () | |
Get all edges in the graph. More... | |
createNode (string $id, array $attrs=[]) | |
Create node and add it to the graph. More... | |
addNode (Node $node) | |
Add existing node to the graph. More... | |
getNode (string $id) | |
Get node by its ID. More... | |
hasNode (string $id) | |
Returns true if a given node exists within the graph. More... | |
removeNode (Node $node) | |
Remove node and connected edges from the graph. More... | |
createEdge (?string $id, Node $start, Node $end, array $attrs=[]) | |
Create a new edge and add it to the graph. More... | |
addEdge (Edge $edge) | |
Add existing edge to the graph. More... | |
getEdge (string $id) | |
Get Edge by its ID. More... | |
hasEdge (string $id) | |
Returns true if a given edge exists within the graph. More... | |
removeEdge (Edge $edge) | |
Remove edge from the graph and disconnect it from nodes. More... | |
getParentNode () | |
nodeAttrChanged ($node, $key, $oldValue, $newValue) | |
edgeAttrChanged ($node, $key, $oldValue, $newValue) | |
offsetSet ($key, $value) | |
& | offsetGet ($key) |
getAttr (string $key, $defaultValue=null) | |
offsetUnset ($key) | |
setAttr (string $key, $newValue) | |
removeAttr (string $key) | |
offsetExists ($key) | |
getAttributes () | |
Protected Member Functions | |
__construct (Node $parentNode=null, array $attrs=[]) | |
Constructor. More... | |
onAttrChanged (string $key, $oldValue, $newValue) | |
Handle change of an attribute. More... | |
Protected Attributes | |
Graph | $rootGraph = null |
Root graph. More... | |
ElementAttrIndex | $nodeAttrIndex |
Node index. More... | |
ElementAttrIndex | $edgeAttrIndex |
Edge index. More... | |
|
protected |
Constructor.
getRootGraph | ( | ) |
getNodes | ( | ) |
Get all nodes in the graph.
getEdges | ( | ) |
Get all edges in the graph.
createNode | ( | string | $id, |
array | $attrs = [] |
||
) |
addNode | ( | Node | $node | ) |
getNode | ( | string | $id | ) |
hasNode | ( | string | $id | ) |
Returns true if a given node exists within the graph.
removeNode | ( | Node | $node | ) |
addEdge | ( | Edge | $edge | ) |
hasEdge | ( | string | $id | ) |
Returns true if a given edge exists within the graph.
removeEdge | ( | Edge | $edge | ) |
getParentNode | ( | ) |
nodeAttrChanged | ( | $node, | |
$key, | |||
$oldValue, | |||
$newValue | |||
) |
edgeAttrChanged | ( | $node, | |
$key, | |||
$oldValue, | |||
$newValue | |||
) |
|
protected |
Handle change of an attribute.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protected |
Root graph.
|
protected |
Node index.
|
protected |
Edge index.