mem-memov / quatro
There is no license information available for the latest version (dev-master) of this package.
Graph basic library
dev-master
2016-06-26 18:23 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: 5.4.*
This package is auto-updated.
Last update: 2025-01-12 21:24:36 UTC
README
linear graph
class MyStore implements MemMemov\Quatro\StoreInterface { }
$myStore = new MyStore();
$quatro = new MemMemov\Quatro\Quatro($myStore);
Create new nodes
$n1 = $quatro->create(); $n2 = $quatro->create(); $n3 = $quatro->create();
Connect nodes
$n1->add($n2); $n1->add($n3);
Iterate over child nodes
$n1->each(function($node) {
});
Find a node by its ID
$n3 = $quatro->read(3);