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
Getter Handler
handle(\Pho\Framework\ParticleInterface $particle, array $pack, \Pho\Framework\Handlers\string $name, array $args) : mixed
Catch-all handler
\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 |
"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(\Pho\Framework\ParticleInterface $particle, \Pho\Framework\Cargo\FieldsCargo $cargo, string $name, array $args = array()) : mixed
Returns the field value
\Pho\Framework\ParticleInterface | $particle | |
\Pho\Framework\Cargo\FieldsCargo | $cargo | |
string | $name | Field name |
array | $args | Any arguments if available |
Field value
edgeMethodExists(array $pack, string $name, \Pho\Lib\Graph\Direction $direction) : boolean
Whether the given method is available for incoming or outgoing edges.
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. |
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 asgetComments()[0]
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. |
edgeCallableExists(array $pack, string $name, \Pho\Lib\Graph\Direction $direction) : boolean
Whether the given method is available for incoming or outgoing edge callable.
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. |
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 asgetComments()[0]
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. |
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
\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 |
The edge nodes.
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
\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 |
The edge nodes.