protected function executeStage($stage, Node $node, Application $application, Deployment $deployment)
    {
        foreach (['before', 'tasks', 'after'] as $stageStep) {
            foreach (['_', $application->getName()] as $applicationName) {
                $label = $applicationName === '_' ? 'for all' : 'for application ' . $applicationName;

                if (isset($this->tasks['stage'][$applicationName][$stage][$stageStep])) {
                    $deployment->getLogger()->debug('Executing stage "' . $stage . '" (step "' . $stageStep . '") on "' . $node->getName() . '" ' . $label);
                    foreach ($this->tasks['stage'][$applicationName][$stage][$stageStep] as $task) {
                        $this->executeTask($task, $node, $application, $deployment, $stage);
                    }
                }
            }
        }
    }
protected function executeStage($stage, Node $node, Application $application, Deployment $deployment)
    {
        foreach (['before', 'tasks', 'after'] as $stageStep) {
            foreach (['_', $application->getName()] as $applicationName) {
                $label = $applicationName === '_' ? 'for all' : 'for application ' . $applicationName;

                if (isset($this->tasks['stage'][$applicationName][$stage][$stageStep])) {
                    $deployment->getLogger()->debug('Executing stage "' . $stage . '" (step "' . $stageStep . '") on "' . $node->getName() . '" ' . $label);
                    foreach ($this->tasks['stage'][$applicationName][$stage][$stageStep] as $task) {
                        $this->executeTask($task, $node, $application, $deployment, $stage);
                    }
                }
            }
        }
    }
protected function executeStage ( $ stage , Node $ node , Application $ application , Deployment $ deployment ) { foreach ( [ 'before' , 'tasks' , 'after' ] as $ stageStep ) { foreach ( [ '_' , $ application -> getName ( ) ] as $ applicationName ) { $ label = $ applicationName === '_' ? 'for all' : 'for application ' . $ applicationName ; if ( isset ( $ this -> tasks [ 'stage' ] [ $ applicationName ] [ $ stage ] [ $ stageStep ] ) ) { $ deployment -> getLogger ( ) -> debug ( 'Executing stage "' . $ stage . '" (step "' . $ stageStep . '") on "' . $ node -> getName ( ) . '" ' . $ label ) ; foreach ( $ this -> tasks [ 'stage' ] [ $ applicationName ] [ $ stage ] [ $ stageStep ] as $ task ) { $ this -> executeTask ( $ task , $ node , $ application , $ deployment , $ stage ) ; } } } } }
Execute a stage for a node and application

@param string $stage
@param \TYPO3\Surf\Domain\Model\Node $node
@param \TYPO3\Surf\Domain\Model\Application $application
@param \TYPO3\Surf\Domain\Model\Deployment $deployment
@throws DeploymentLockedException
Execute a stage for a node and application