protected function invokeStep(Step $step, Bootstrap $bootstrap)
{
$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', [$step, $this->identifier]);
$identifier = $step->getIdentifier();
$step($bootstrap);
$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', [$step, $this->identifier]);
if (isset($this->steps[$identifier])) {
foreach ($this->steps[$identifier] as $followingStep) {
$this->invokeStep($followingStep, $bootstrap);
}
}
}