\Pho\Lib\GraphNodeWorkerInterface

An worker interface for the Node class

A graph is made up of nodes (aka. nodes, or points) which are connected by edges (aka arcs, or lines) therefore node is the fundamental unit of which graphs are formed.

Nodes are indivisible, yet they share some common characteristics with edges. In Pho context, these commonalities are represented with the EntityInterface.

Summary

Methods
Constants
edges()
edge()
context()
changeContext()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

edges()

edges() : \Pho\Lib\Graph\EdgeList

Gives access to this node's EdgeList property.

EdgeList contains all the edges in and out from this node. It is also used to add new edges.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\Pho\Lib\Graph\EdgeList

edge()

edge(string  $id) : \Pho\Lib\Graph\EdgeInterface

Retrieve Edge objects given its ID.

Used in serialization. This function must be implemented for a higher level package with persistence. Otherwise it has no use and no function within pho-lib-graph.

Parameters

string $id

The Edge ID in string format

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\Pho\Lib\Graph\EdgeInterface

context()

context() : \Pho\Lib\Graph\ArrayObject

Returns the context that this node is a member of.

Contexts are GraphInterface objects that contain nodes.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\Pho\Lib\Graph\ArrayObject —

An ArrayObject of contexts in no particular order.

changeContext()

changeContext(\Pho\Lib\Graph\GraphInterface  $context) : void

Changes the fundamental context of a node.

Rarely, a node may need its fundamental context to change after its construction. This method enables setting a new context for the node.

Parameters

\Pho\Lib\Graph\GraphInterface $context
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/emresokullu/Code/website/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275