libSmalldb  v0.7-66-gb94d22a
Public Member Functions | Protected Member Functions | List of all members
Node Class Reference

Inheritance diagram for Node

Public Member Functions

 __construct (NestedGraph $graph, string $id, array $attrs)
 
 remove ()
 
 connectEdge (Edge $edge)
 
 disconnectEdge (Edge $edge)
 
 getConnectedEdges ()
 Get list of edges connected to this node. More...
 
 getNestedGraph ()
 Get nested graph of this node. More...
 
 hasNestedGraph ()
 Does the node have a nested graph? More...
 
- Public Member Functions inherited from AbstractElement
 __construct (NestedGraph $graph, string $id, array $attrs)
 
 getId ()
 
 getGraph ()
 
 getRootGraph ()
 
 setAttr (string $key, $newValue)
 
 getAttr (string $key, $defaultValue=null)
 
 removeAttr (string $key)
 
 getAttributes ()
 
 offsetExists ($key)
 
offsetGet ($key)
 
 offsetSet ($key, $value)
 
 offsetUnset ($key)
 

Protected Member Functions

 onAttrChanged (string $key, $oldValue, $newValue)
 Handle change of an attribute. More...
 
- Protected Member Functions inherited from AbstractElement
 onAttrChanged (string $key, $oldValue, $newValue)
 

Member Function Documentation

◆ getConnectedEdges()

getConnectedEdges ( )

Get list of edges connected to this node.

An edge may be connected multiple times to the node, but it will be present in this list only once.

Returns
Edge[]

◆ getNestedGraph()

getNestedGraph ( )

Get nested graph of this node.

The graph is created if the node does not have any.

Returns
NestedGraph

◆ hasNestedGraph()

hasNestedGraph ( )

Does the node have a nested graph?

◆ onAttrChanged()

onAttrChanged ( string  $key,
  $oldValue,
  $newValue 
)
protected

Handle change of an attribute.

Parameters
string$key
$oldValue
$newValue