PHP Class Kraken\Container\Service\ServiceSorter

Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$instances Kraken\Container\ServiceProviderInterface[]
$obtainableIn string[]
$ordered bool[]
$pvds string[][]
$reqs string[][]

Public Methods

Method Description
__destruct ( )
sortProviders ( Kraken\Container\ServiceProviderInterface[] $providers ) : Kraken\Container\ServiceProviderInterface[] Analyze required and provided dependencies of providers and sort the list to ensure right order while resolving dependency tree.

Private Methods

Method Description
orderProvider ( Kraken\Container\ServiceProviderInterface $provider ) : string[]
orderResource ( string $resourceName, &$localStack = [] ) : string[]

Method Details

__destruct() public method

public __destruct ( )

sortProviders() public method

Analyze required and provided dependencies of providers and sort the list to ensure right order while resolving dependency tree.
public sortProviders ( Kraken\Container\ServiceProviderInterface[] $providers ) : Kraken\Container\ServiceProviderInterface[]
$providers Kraken\Container\ServiceProviderInterface[]
return Kraken\Container\ServiceProviderInterface[]

Property Details

$instances protected property

protected ServiceProviderInterface[],Kraken\Container $instances
return Kraken\Container\ServiceProviderInterface[]

$obtainableIn protected property

protected string[] $obtainableIn
return string[]

$ordered protected property

protected bool[] $ordered
return bool[]

$pvds protected property

protected string[][] $pvds
return string[][]

$reqs protected property

protected string[][] $reqs
return string[][]