library dependency-graph
A simple dependency graph data structure
almostanything/dependency-graph
A simple dependency graph data structure
- Wednesday, February 4, 2015
- by startDaemons
- Repository
- 2 Watchers
- 0 Stars
- 11 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
Dependency Graph
A dependency graph data structure., (*1)
Usage
Basic Usage, (*2)
use AlmostAnything\DependencyGraph\DependencyGraphNode as Node;
$jq = new Node('jquery.js');
$bs = new Node('bootstrap.js');
$dp = new Node('datepicker.js');
$jq->addChild($bs);
$dp->addParents($bs, $jq);
$graph = $jq->getGraph(); // returns an instance of DependencyGraph
var_dump($graph->topologicalSort());
Dependency Graphs can be disconnected so you may want to provide a DependencyGraph instance., (*3)
use AlmostAnything\DependencyGraph\DependencyGraphNode as Node;
use AlmostAnything\DependencyGraph\DependencyGraph as Graph;
$graph = new Graph();
$jq = new Node('jquery.js', $graph);
$pt = new Node('prototype.js', $graph);
$jq->addChild(new Node('bootstrap.js')); // $graph will be automatically set on child
$pt->addChild(new Node('pt-typeahead.js');
dev-master
9999999-dev
A simple dependency graph data structure
Sources
Download
The Requires
The Development Requires
by
Rhys Emmerson
v1.0.0
1.0.0.0
A simple dependency graph data structure
Sources
Download
The Requires
The Development Requires
by
Rhys Emmerson
v0.1.0-beta2
0.1.0.0-beta2
A simple dependency graph data structure
Sources
Download
The Development Requires
by
Rhys Emmerson
v0.1.0-beta
0.1.0.0-beta
A simple dependency graph data structure
Sources
Download
The Development Requires
by
Rhys Emmerson