libSmalldb
v2.0.2
|
Public Member Functions | |
__construct (array $attrs=[]) | |
createNestedGraph (Node $parentNode) | |
getNodeById (string $id) | |
getEdgeById (string $id) | |
getAllNodes () | |
Get all nodes in the graph, including nodes in nested graphs. More... | |
getAllEdges () | |
Get all edges in the graph, including edges in nested graphs. More... | |
getNodesByAttr (string $key, $value=true) | |
Get nodes which have attribute $key equal to $value. More... | |
getEdgesByAttr (string $key, $value=true) | |
Get edges which have attribute $key equal to $value. More... | |
indexNodeAttr ($key) | |
indexEdgeAttr ($key) | |
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 | |
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... | |
__construct | ( | array | $attrs = [] | ) |
createNestedGraph | ( | Node | $parentNode | ) |
getNodeById | ( | string | $id | ) |
getEdgeById | ( | string | $id | ) |
getAllNodes | ( | ) |
getAllEdges | ( | ) |
getNodesByAttr | ( | string | $key, |
$value = true |
|||
) |
Get nodes which have attribute $key equal to $value.
string | $key | |
mixed | $value |
getEdgesByAttr | ( | string | $key, |
$value = true |
|||
) |
Get edges which have attribute $key equal to $value.
string | $key | |
mixed | $value |
indexNodeAttr | ( | $key | ) |
indexEdgeAttr | ( | $key | ) |
|
inherited |
|
inherited |
Get all nodes in the graph.
|
inherited |
Get all edges in the graph.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Returns true if a given node exists within the graph.
|
inherited |
|
inherited |
|
inherited |
Returns true if a given edge exists within the graph.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Handle change of an attribute.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Root graph.
|
protectedinherited |
Node index.
|
protectedinherited |
Edge index.