\Pho\Lib\GraphEncapsulatedEdge

Encapsulated Edge used inside EdgeList

Encapsulated edges are array-like objects that encapsulate the actual edge for easy manipulation inside EdgeList.

They consist of:

  • id: The edge id.
  • object: The edge itself
  • classes: All the ancestor classes of the edge in an array

The encapsulated edges may or may not have the object implemented. Whether they have it or not, can be learned by calling the hydrated() function that returns a boolean value.

A dehydrated encapsulated edge is how edges are stored in the database. The edge object can be recaptured from the ID.

Summary

Methods
Properties
Constants
id()
classes()
fromEdge()
fromArray()
hydrated()
edge()
toArray()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
findClasses()
deobject()
$object
$classes
$id
N/A

Properties

$object

$object : \Pho\Lib\Graph\EdgeInterface

Type

\Pho\Lib\Graph\EdgeInterface

$classes

$classes : array

Type

array

Methods

id()

id() : \Pho\Lib\Graph\ID

The ID of the edge

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\ID

classes()

classes() : array

Returns the classes that the edge inherits from.

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

array

fromEdge()

fromEdge(\Pho\Lib\Graph\EdgeInterface  $edge) : \Pho\Lib\Graph\EncapsulatedEdge

Creates a new capsule from an edge.

Parameters

\Pho\Lib\Graph\EdgeInterface $edge
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\EncapsulatedEdge

A hydrated encapsulated edge object.

fromArray()

fromArray(array  $array) 

Parameters

array $array
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

hydrated()

hydrated() : boolean

Whether the edge object is present or not

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

boolean

edge()

edge() : \Pho\Lib\Graph\EdgeInterface

Retrieves the edge object

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

toArray()

toArray() 

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

__construct()

__construct() 

Constructor.

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

findClasses()

findClasses(string  $class) : array

Retrieves ancestor classes of a given edge.

Parameters

string $class

The class name of the edge.

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

array —

Ancestors

deobject()

deobject() : array

Returns the capsule without the edge object inside.

Used in serialization.

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

array