\Pho\Framework\HandlersHas

"Has" Handler

Summary

Methods
Properties
Constants
handle()
No public properties found
ADJACENCY_EQUIVALENT
edgeMethodExists()
edgeCallableExists()
checkEdgeNode()
checkEdgeItself()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ADJACENCY_EQUIVALENT

ADJACENCY_EQUIVALENT = array("out" => "headID", "in" => "tailID") : array

Direction out: is equivalent to head nodes of an edge Direction in: is equivalent to tail nodes of an edge

Methods

handle()

handle(\Pho\Framework\ParticleInterface  $particle, array  $pack, \Pho\Framework\Handlers\string  $name, array  $args) : mixed

Catch-all method for hasers -hasSomething()-

Parameters

\Pho\Framework\ParticleInterface $particle

The particle that this handler is working on.

array $pack

Holds cargo variables extracted by loaders.

\Pho\Framework\Handlers\string $name

Catch-all method name

array $args

Catch-all method arguments

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

mixed —

"Has"=>bool. Get=>array. Set/Form=>\Pho\Lib\Graph\EdgeInterface by default, but in order to provide flexibility for higher-level components to return node (in need) the official return value is \Pho\Lib\Graph\EntityInterface which is the parent of both NodeInterface and EdgeInterface.

edgeMethodExists()

edgeMethodExists(array  $pack, string  $name, \Pho\Lib\Graph\ID  $id, \Pho\Lib\Graph\Direction  $direction) : boolean

Whether the given method is available for incoming or outgoing edges.

Parameters

array $pack

Holds incoming and outgoing cargos.

string $name

Method name. Queried among incoming and outgoing labels.

\Pho\Lib\Graph\ID $id
\Pho\Lib\Graph\Direction $direction

Direction in question; in or out.

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

edgeCallableExists()

edgeCallableExists(array  $pack, string  $name, \Pho\Lib\Graph\ID  $id, \Pho\Lib\Graph\Direction  $direction) : boolean

Whether the given method is available for incoming or outgoing edge callables.

Parameters

array $pack

Holds incoming and outgoing cargos.

string $name

Method name. Queried among incoming and outgoing labels.

\Pho\Lib\Graph\ID $id
\Pho\Lib\Graph\Direction $direction

Direction in question; in or out.

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

checkEdgeNode()

checkEdgeNode(\Pho\Framework\ParticleInterface  $particle, array  $pack, string  $name, \Pho\Lib\Graph\ID  $id, \Pho\Lib\Graph\Direction  $direction) : boolean

"Has" Catcher for Edges

Parameters

\Pho\Framework\ParticleInterface $particle

The particle that this handler is associated with.

array $pack

Holds cargo variables extracted by loaders.

string $name

The edge node label in plural.

\Pho\Lib\Graph\ID $id

The ID of the node in question.

\Pho\Lib\Graph\Direction $direction

The direction of the edge adjacent nodes to look up.

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 —

whether the node exists or not

checkEdgeItself()

checkEdgeItself(\Pho\Framework\ParticleInterface  $particle, array  $pack, string  $name, \Pho\Lib\Graph\ID  $id, \Pho\Lib\Graph\Direction  $direction) : boolean

"Has" Catcher for Edge Callables

Parameters

\Pho\Framework\ParticleInterface $particle

The particle that this handler is associated with.

array $pack

Holds cargo variables extracted by loaders.

string $name

The edge node label in plural.

\Pho\Lib\Graph\ID $id

The ID of the node in question.

\Pho\Lib\Graph\Direction $direction

The direction of the edge adjacent nodes to look up.

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 —

whether the node exists or not