PHP code example of usox / circulon

1. Go to this page and download the library: Download usox/circulon library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

usox / circulon example snippets


$resolver = new \Usox\Circulon\Circulon();
$resolver
  ->addDependency('foo', 'bar')
  ->addDependency('foobar', [])
  ->addDependency('baz', [])
  ->addDependency('bar', ['baz', 'foobar']);

$list = $resolver->resolve();

var_dump($list);

array(4) {
  [0] =>
  string(3) "baz"
  [1] =>
  string(6) "foobar"
  [2] =>
  string(3) "bar"
  [3] =>
  string(3) "foo"
}


$resolver
  ->addDependency('foo', 'bar')
  ->addDependency('bar', 'baz')
  ->addDependency('baz', 'foo');

$resolver->resolve();