dev-master
9999999-dev http://anthonykgross.fr/dependency-resolver
MIT
The Requires
- php >=5.5
The Development Requires
- ext-curl *
- phpunit/phpunit ^4.0 | ^5.0
Wallogit.com
2017 © Pedro Peláez
dependency-resolver
The recommended way to install anthonykgross/dependency-resolver is through Composer., (*2)
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of dependency-resolver:, (*3)
php composer.phar require anthonykgross/dependency-resolver "dev-master"
After installing, you need to require Composer's autoloader:, (*4)
require 'vendor/autoload.php';
You can then later update dependency-resolver using composer:, (*5)
bash
composer.phar update, (*6)
```php $tree = array( 'A' => array(), 'B' => array('A'), 'C' => array('B'), 'D' => array('C', 'A'), 'E' => array('C', 'B'), ); $resolution = \Algorithm\DependencyResolver::resolve($tree); print($resolution); // ['A','B','C','D','E'], (*7)
OR
```php
$tree = array(
'A' => array('B'),
'B' => array('C'),
'C' => array('A'),
);
$resolution = \Algorithm\DependencyResolver::resolve($tree);
// RuntimeException : Circular dependency: C -> A
Documentation - https://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/ - http://mamchenkov.net/wordpress/2016/11/22/dependency-resolution-with-graphs-in-php/, (*8)
Anthony K GROSS - http://anthonykgross.fr - https://twitter.com/anthonykgross - https://github.com/anthonykgross, (*9)
Joshua Behrens - https://github.com/JoshuaBehrens, (*10)
Code and documentation copyright 2020. Code released under the MIT license., (*11)
dependency-resolver
MIT