Download the PHP package almostanything/dependency-graph without Composer
On this page you can find all versions of the php package almostanything/dependency-graph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download almostanything/dependency-graph
More information about almostanything/dependency-graph
Files in almostanything/dependency-graph
Download almostanything/dependency-graph
More information about almostanything/dependency-graph
Files in almostanything/dependency-graph
Vendor almostanything
Package dependency-graph
Short Description A simple dependency graph data structure
License
Package dependency-graph
Short Description A simple dependency graph data structure
License
Please rate this library. Is it a good library?
Informations about the package dependency-graph
Dependency Graph
A dependency graph data structure.
Usage
Basic Usage
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.
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');
All versions of dependency-graph with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.2
The package almostanything/dependency-graph contains the following files
Loading the files please wait ....