2017 © Pedro Peláez
 

library dependency-resolver

dependency-resolver

image

anthonykgross/dependency-resolver

dependency-resolver

  • Tuesday, July 25, 2017
  • by anthonykgross
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 100 % Grown

The README.md

Build Status, (*1)

Installing anthonykgross/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)

Usage

```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)

Contributors

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)

The Versions

25/07 2017

dev-master

9999999-dev http://anthonykgross.fr/

dependency-resolver

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires