Slide 57
Slide 57 text
stomp = $stomp;
$this->queue = $queue;
}
protected function prepare() {
if (php_sapi_name() != 'cli') {
throw new RuntimeException('You cannot dispatch outside of the CLI');
}
if (function_exists('pcntl_signal')) {
pcntl_signal(SIGTERM, array($this, 'signal'));
pcntl_signal(SIGINT, array($this, 'signal'));
pcntl_signal(SIGHUP, array($this, 'signal'));
}
}
protected function signal($signal) {
$this->signal = $signal;
}