\Pho\Framework\HandlersForm

Particle Former Handler

This is similar to setters, except that this also forms an actual particle (aka node)

Summary

Methods
Properties
Constants
handle()
No public properties found
No constants found
formHead()
findFormativeClass()
No protected properties found
N/A
No private methods found
No private properties found
N/A

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.

formHead()

formHead(\Pho\Framework\ParticleInterface  $particle, array  $pack, string  $name, array  $args) : \Pho\Lib\Graph\NodeInterface

Forms the head particle.

Parameters

\Pho\Framework\ParticleInterface $particle

The particle that this handler is working on.

array $pack

Holds cargo variables extracted by loaders.

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

\Pho\Lib\Graph\NodeInterface

findFormativeClass()

findFormativeClass(string  $name, array  $args, array  $pack) : string

Based on given arguments, helps find the matching class to form.

IMPORTANT NOTE for developers;

We don't touch the $name argument. Because a call like: $user->createGroup() means that the formative edge is CreateGroup and it was already registered in the particle with "camelize" function. So camelizing calls would allow methods like $user->create_group() or $user->CreateGroup also take the same effect. This is not the behavior we want.

Parameters

string $name
array $args
array $pack
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

string —

The class name.