\Pho\Lib\GraphDirection

Defines Edge Direction.

This class is a PHP implementation of struct. You can call a an "In" direction with Direction::in() and it would still be an instance of the Direction::class

Summary

Methods
Properties
Constants
in()
out()
fromString()
equals()
__toString()
toString()
No public properties found
IN
OUT
No protected methods found
No protected properties found
N/A
__construct()
$value
N/A

Constants

IN

IN = "in"

OUT

OUT = "out"

Properties

$value

$value : string

Either "in" or "out"

Type

string

Methods

in()

in() : \Pho\Lib\Graph\Direction

Represents incoming

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

out()

out() : \Pho\Lib\Graph\Direction

Represents outgoin

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

fromString()

fromString(string  $direction) : \Pho\Lib\Graph\Direction

Reproduces Direction object from string representation.

Parameters

string $direction

Throws

\Pho\Lib\Graph\Exceptions\InvalidDirectionException

thrown when the direction string is not recognized.

Returns

\Pho\Lib\Graph\Direction

equals()

equals(\Pho\Lib\Graph\Direction  $direction) : boolean

Verifies identicality

Parameters

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

__toString()

__toString() : string

{@internal}

Stringifies

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

toString()

toString() : string

Stringifies

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

__construct()

__construct(string  $value) 

Constructor.

No need to check for value validity since the method is set to be private, hence cannot be called by others.

Parameters

string $value

Direction::in() or Direction::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