czproject/dependency-php

PHP class for dependency resolving.

v1.0.1 2013-10-05 19:33 UTC

README

Build Status

PHP class for dependency resolving.

Become a Patron! Buy me a coffee

Installation

Download a latest package or use Composer:

composer require czproject/dependency-php

Dependency-PHP requires PHP 5.3.0 or later.

Usage

$resolver = new Cz\Dependency;
$resolver->add('x', array('a', 'b'))
	->add('a', array('b', 'c'))
	->add('b', 'd')
	->add('c', array('d'));

$resolver->getResolved(); // returns ['d', 'b', 'c', 'a', 'x']

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/