TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DependencyResolver Class Reference

Public Member Functions

 injectDependencyOrderingService (DependencyOrderingService $dependencyOrderingService)
 
 sortPackageStatesConfigurationByDependency (array $packageStatesConfiguration)
 

Protected Member Functions

 convertConfigurationForGraph (array $packageStatesConfiguration, array $packageKeys)
 
 addDependencyToFrameworkToAllExtensions (array $packageStateConfiguration, array $rootPackageKeys)
 
 buildDependencyGraph (array $packageStateConfiguration)
 

Protected Attributes

 $dependencyOrderingService
 

Detailed Description

This class takes care about dependencies between packages. It provides functionality to resolve dependencies and to determine the crucial loading order of the packages.

Definition at line 25 of file core/Classes/Package/DependencyResolver.php.

Member Function Documentation

addDependencyToFrameworkToAllExtensions ( array  $packageStateConfiguration,
array  $rootPackageKeys 
)
protected

Adds all root packages of current dependency graph as dependency to all extensions

This ensures that the framework extensions (aka sysext) are always loaded first, before any other external extension.

Parameters
array$packageStateConfiguration
array$rootPackageKeys
Returns
array

Definition at line 109 of file core/Classes/Package/DependencyResolver.php.

Referenced by DependencyResolver\buildDependencyGraph().

buildDependencyGraph ( array  $packageStateConfiguration)
protected

Builds the dependency graph for all packages

This method also introduces dependencies among the dependencies to ensure the loading order is exactly as specified in the list.

Parameters
array$packageStateConfiguration
Returns
array

Definition at line 137 of file core/Classes/Package/DependencyResolver.php.

References DependencyResolver\addDependencyToFrameworkToAllExtensions(), and DependencyResolver\convertConfigurationForGraph().

Referenced by DependencyResolver\sortPackageStatesConfigurationByDependency().

convertConfigurationForGraph ( array  $packageStatesConfiguration,
array  $packageKeys 
)
protected

Convert the package configuration into a dependency definition

This converts "dependencies" and "suggestions" to "after" syntax for the usage in DependencyOrderingService

Parameters
array$packageStatesConfiguration
array$packageKeys
Returns
array
Exceptions
UnexpectedValueException

Definition at line 60 of file core/Classes/Package/DependencyResolver.php.

Referenced by DependencyResolver\buildDependencyGraph().

injectDependencyOrderingService ( DependencyOrderingService  $dependencyOrderingService)
Parameters
DependencyOrderingService$dependencyOrderingService

Definition at line 35 of file core/Classes/Package/DependencyResolver.php.

References DependencyResolver\$dependencyOrderingService.

sortPackageStatesConfigurationByDependency ( array  $packageStatesConfiguration)
Parameters
array$packageStatesConfiguration
Returns
array Returns the packageStatesConfiguration sorted by dependencies
Exceptions
UnexpectedValueException

Definition at line 45 of file core/Classes/Package/DependencyResolver.php.

References DependencyResolver\buildDependencyGraph().

Member Data Documentation

$dependencyOrderingService
protected