kernel/private/classes/ezptopologicalsort.php
File containing the ezpTopologicalSort class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\ezpTopologicalSort
Package: Default
Parameters
Sorts a series of dependencies in linear order (topological sort).
Properties
Methods


__construct(
array $dependencies
=
array()
)
:
void
Create a topological sort.
null, // a has no dependencies
'b' => 'a', // b depends on a
'd' => 'b', // d depends on b
'e' => array( 'd', 'c' ) // e depends on d and c
) );
?>
Name | Type | Description |
---|---|---|
$dependencies | array | Array of dependencies where the keys depends on the values. Values can either be a scalar or an array. |


getRootNodes(
)
:
array
Returns a list of node objects that do not have parents.
Returns
Type | Description |
---|---|
array | of node objects |