private function registerSignals(OutputInterface $output)
    {
        foreach ($this->signalCallbacks as $signal => $callbacks) {
            foreach ($callbacks as $callback) {
                pcntl_signal($signal, function() use ($signal, $output, $callback) {
                    if ($output->isVerbose()) {
                        $output->writeln("Received signal '$signal', calling registered callback.");
                    }
                    return $callback();
                });
            }
        }
    }
private function registerSignals(OutputInterface $output)
    {
        foreach ($this->signalCallbacks as $signal => $callbacks) {
            foreach ($callbacks as $callback) {
                pcntl_signal($signal, function() use ($signal, $output, $callback) {
                    if ($output->isVerbose()) {
                        $output->writeln("Received signal '$signal', calling registered callback.");
                    }
                    return $callback();
                });
            }
        }
    }
private function registerSignals ( OutputInterface $ output ) { foreach ( $ this -> signalCallbacks as $ signal => $ callbacks ) { foreach ( $ callbacks as $ callback ) { pcntl_signal ( $ signal , function ( ) use ( $ signal , $ output , $ callback ) { if ( $ output -> isVerbose ( ) ) { $ output -> writeln ( "Received signal '$signal', calling registered callback." ) ; } return $ callback ( ) ; } ) ; } } }
Register each of the added signals for each of the callbacks.
@param OutputInterface $output
Register each of the added signals for each of the callbacks .