czproject/dependency-php

PHP class for dependency resolving.

Fund package maintenance!
Other

v2.0.0 2021-03-13 18:08 UTC

This package is auto-updated.

Last update: 2024-10-13 18:31:48 UTC


README

Build Status Downloads this Month Latest Stable Version License

PHP class for dependency resolving.

Donate

Installation

Download a latest package or use Composer:

composer require czproject/dependency-php

Dependency-PHP requires PHP 5.6.0 or later.

Usage

$resolver = new CzProject\DependencyPhp\Resolver;
$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/