\Pho\Framework\HandlersGet

Getter Handler

Summary

Methods
Properties
Constants
handle()
No public properties found
ADJACENCY_EQUIVALENT
getField()
edgeMethodExists()
edgeMethodExistsSingular()
edgeCallableExists()
edgeCallableExistsSingular()
getEdgeNodes()
getEdgeItself()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ADJACENCY_EQUIVALENT

ADJACENCY_EQUIVALENT = array("out" => "head", "in" => "tail") : 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 handler

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.

getField()

getField(\Pho\Framework\ParticleInterface  $particle, \Pho\Framework\Cargo\FieldsCargo  $cargo, string  $name, array  $args = array()) : mixed

Returns the field value

Parameters

\Pho\Framework\ParticleInterface $particle
\Pho\Framework\Cargo\FieldsCargo $cargo
string $name

Field name

array $args

Any arguments if available

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 —

Field value

edgeMethodExists()

edgeMethodExists(array  $pack, string  $name, \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\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

edgeMethodExistsSingular()

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

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

Works similarly to edgeMethodExists with the difference of looking up singular labels. Example:

getComment() is the same as getComments()[0]

Parameters

array $pack

Holds incoming and outgoing cargos.

string $name

Method name. Queried among incoming and outgoing labels.

\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\Direction  $direction) : boolean

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

Parameters

array $pack

Holds incoming and outgoing cargos.

string $name

Method name. Queried among incoming and outgoing labels.

\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

edgeCallableExistsSingular()

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

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

Works similarly to edgeCallableExists with the difference of looking up singular labels. Example:

getComment() is the same as getComments()[0]

Parameters

array $pack

Holds incoming and outgoing cargos.

string $name

Method name. Queried among incoming and outgoing labels.

\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

getEdgeNodes()

getEdgeNodes(\Pho\Framework\ParticleInterface  $particle, array  $pack, string  $name, \Pho\Lib\Graph\Direction  $direction, boolean  $singular = false) : array

Getter Catcher for Edges In and Out

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\Direction $direction

The direction of the edge adjacent nodes to look up.

boolean $singular

Is this for a singular call

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 —

The edge nodes.

getEdgeItself()

getEdgeItself(\Pho\Framework\ParticleInterface  $particle, array  $pack, string  $name, \Pho\Lib\Graph\Direction  $direction, boolean  $singular = false) : array

Getter Catcher for Edge Callables In and Out

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\Direction $direction

The direction of the edge adjacent nodes to look up.

boolean $singular

Is this for a singular call

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 —

The edge nodes.