Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helhum/typo3-dep-resolver
https://github.com/helhum/typo3-dep-resolver
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/helhum/typo3-dep-resolver
- Owner: helhum
- Created: 2017-12-27T09:34:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T09:47:49.000Z (about 7 years ago)
- Last Synced: 2024-10-14T04:12:34.789Z (3 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TYPO3 Dependency Resolving API
## Installation
`composer require typo3/dep-resolver`## Usage
```php
$listenersToBeOrdered = [
FooListener::class => [],
BarListener::class => [
'before' => [FooListener::class],
'after' => [BazListener::class],
],
BazListener::class => [],
];
$orderingService = new \TYPO3\DependencyOrdering\DependencyOrderingService();
$orderedListeners = $orderingService->orderByDependencies($listenersToBeOrdered);
var_export($orderedListeners);/* Outputs:
array (
'BazListener' =>
array (
),
'BarListener' =>
array (
'before' =>
array (
0 => 'FooListener',
),
'after' =>
array (
0 => 'BazListener',
),
),
'FooListener' =>
array (
),
)
*/
```