$creator
$creator : \Pho\Framework\Actor
Who created this node. Must point to an Actor.
Points to self by Actor particles.
The Frame Particle
At its core, Frame is a graph, or more specifically, a subgraph. It extends the Pho\Lib\Graph\SubGraph class, which is a regular node, as well as a Graph (by way of using the Pho\Lib\Graph\ClusterTrait) both at the same time. It implements both Pho\Lib\Graph\GraphInterface and Pho\Lib\Graph\NodeInterface. In order to prevent any confusions with Pho\Lib\Graph's nomenclature, this class is called Frame instead.
In contrast to other particles, Frame doesn't contain edges but its "contains" method acts similarly to an edge.
$creator : \Pho\Framework\Actor
Who created this node. Must point to an Actor.
Points to self by Actor particles.
$edge_list : \Pho\Lib\Graph\EdgeList
Internal variable that keeps track of edges in and out.
$context : \Pho\Lib\Graph\GraphInterface
The graph context of this node
registerIncomingEdges( $classes) : void
Registers the incoming edges.
The default ones for all nodes are:
$classes |
registerOutgoingEdges( $classes) : void
Registers the outgoing edges.
$classes |
getRegisteredIncomingEdges()
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
getRegisteredOutgoingEdges()
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
registerHandler(string $key, string $class) : void
Registers a new handler adapter.
Default handlers may be overriden.
string | $key | Adapter key; e.g. "get", "set", "form" etc. |
string | $class | Handler class to register. A handler class shall implement HandlerInterface |
toArray() : array
Converts the object to array
Used for serialization/unserialization. Converts internal object properties into a simple format to help with reconstruction.
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 1275The object in array format.
existentials()
{@inheritdoc}
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 1275creator() : \Pho\Framework\Actor
Retrieves the creator of this node.
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 1275notifySubscribers(\Pho\Framework\AbstractNotification $notification) : void
Sends notification to subscriber particles
\Pho\Framework\AbstractNotification | $notification |
exportCargo() : array
Returns all incoming edge, outgoing edge and field keywords.
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 1275An array of incoming edge / outgoing edge / field cargo
__construct(\Pho\Framework\Actor $creator, \Pho\Framework\ContextInterface $context)
{@inheritdoc}
\Pho\Framework\Actor | $creator | |
\Pho\Framework\ContextInterface | $context |
add(\Pho\Lib\Graph\NodeInterface $node, \Pho\Lib\Graph\bool $skip_signals = false, $active_exceptions = false)
{@inheritdoc}
should be able to change context of $node if $node's context is
\Pho\Lib\Graph\NodeInterface | $node | |
\Pho\Lib\Graph\bool | $skip_signals | |
$active_exceptions |
destroy()
{@inheritdoc}
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 1275init()
{@inheritDoc}
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 1275canEmitNodeAddSignals()
{@inheritDoc}
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 1275loadNodesFromArray(array $nodes)
{@inheritdoc}
array | $nodes |
loadNodesFromIDArray(array $node_ids)
{@inheritdoc}
array | $node_ids |
get(\Pho\Lib\Graph\ID $node_id)
{@inheritdoc}
\Pho\Lib\Graph\ID | $node_id |
contains(\Pho\Lib\Graph\ID $node_id)
{@inheritdoc}
\Pho\Lib\Graph\ID | $node_id |
remove(\Pho\Lib\Graph\ID $node_id)
{@inheritdoc}
\Pho\Lib\Graph\ID | $node_id |
members()
{@inheritdoc}
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 1275count()
{@inheritdoc}
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 1275context() : \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 1275An ArrayObject of contexts in no particular order.
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.
\Pho\Lib\Graph\GraphInterface | $context |
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 1275edge(\Pho\Lib\Graph\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.
\Pho\Lib\Graph\string | $id | The Edge ID in string format |
hook(\Pho\Lib\Graph\string $method, \Closure $call)
{@inheritDoc}
\Pho\Lib\Graph\string | $method | |
\Closure | $call |
unhook(\Pho\Lib\Graph\string $method)
{@inheritDoc}
\Pho\Lib\Graph\string | $method |
hooks()
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
on(\Pho\Lib\Graph\Event\string $eventName, $callBack, \Pho\Lib\Graph\Event\int $priority = 100) : void
Subscribe to an event.
\Pho\Lib\Graph\Event\string | $eventName | |
$callBack | ||
\Pho\Lib\Graph\Event\int | $priority |
emit(\Pho\Lib\Graph\Event\string $eventName, array $arguments = array())
Emits an event.
This method will return true if 0 or more listeners were succesfully handled. false is returned if one of the events broke the event chain.
Pho: Please note, continueCallback does not exist with Pho
If the continueCallBack is specified, this callback will be called every time before the next event handler is called.
If the continueCallback returns false, event propagation stops. This allows you to use the eventEmitter as a means for listeners to implement functionality in your application, and break the event loop as soon as some condition is fulfilled.
Note that returning false from an event subscriber breaks propagation and returns false, but if the continue-callback stops propagation, this is still considered a 'successful' operation and returns true.
Lastly, if there are 5 event handlers for an event. The continueCallback will be called at most 4 times.
\Pho\Lib\Graph\Event\string | $eventName | |
array | $arguments |
listeners(\Pho\Lib\Graph\Event\string $eventName, \Pho\Lib\Graph\Event\bool $flat = false) : array<mixed,callable>
Returns the list of listeners for an event.
The list is returned as an array, and the list of events are sorted by their priority.
\Pho\Lib\Graph\Event\string | $eventName | |
\Pho\Lib\Graph\Event\bool | $flat |
removeAllListeners(\Pho\Lib\Graph\Event\string $eventName = null) : void
Removes all listeners.
If the eventName argument is specified, all listeners for that event are removed. If it is not specified, every listener for every event is removed.
\Pho\Lib\Graph\Event\string | $eventName |
in(\Pho\Framework\ContextInterface $context) : boolean
Checks if the given context is contained by or equal to this graph.
\Pho\Framework\ContextInterface | $context |
initializeParticle() : void
Initializes the particle.
Its functions include:
initializeHandler() : void
A helper method to set up edges and fields.
Its inner functions can be summarized as:
1) Uses the Loaders to
autoRegisterOutgoingEdges() : void
Auto-registers outgoing edge classes
Auto-registration is done by directory structure. Directories that sit in this folder, and are named after this class with "Out" suffix (such as "MyNodeOut" for a node class named "MyNode") would be candidate for auto-registration.
Please note, this does not check if it's actually an Edge class. The check is done by the OutgoingEdgeLoader class.
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 1275addEdges(string $direction, $classes) : self
A helper method to register edges
string | $direction | Either incoming or outgoing |
$classes |
graphToArray() : array
Converts the object to array
Used for serialization/unserialization. Converts internal object properties into a simple format to help with reconstruction.
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 1275The object in array format.
hookable()
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