Feature #38222
Step execution signals with concrete name
Status: | New | Start date: | 2012-06-20 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Core | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
currently, Core\Booting\Sequence::invokeStep() looks
1$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', array($step));
2$identifier = $step->getIdentifier();
3$step($bootstrap);
4$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', array($step));
This requires listening to a specific step invocation to look like this (taken from an example):
1$dispatcher->connect('TYPO3\FLOW3\Core\Booting\Sequence', 'afterInvokeStep', function(\TYPO3\FLOW3\Core\Booting\Step $step) use ($bootstrap) {
2 if ($step->getIdentifier() === 'typo3.flow3:objectmanagement:compiletime:create') {
3 $bootstrap->getObjectManager()->get('....');
4 }
5});
Due to the fact that, I claim, invoke-step-listening surely always intends to affect a specific step, I suggest to involve additional "magic" signals that take their name from the step identifier, resulting in, for example,
1$dispatcher->connect('TYPO3\FLOW3\Core\Booting\Sequence', 'afterInvokeStepTypo3Flow3ObjectmanagementCompiletimeCreate', function(\TYPO3\FLOW3\Core\Booting\Step $step) use ($bootstrap) {
2 $bootstrap->getObjectManager()->get('....');
3});
History
#1 Updated by Adrian Föder over 2 years ago
- Assigned To deleted (
Adrian Föder)