protected function _trapSignals() {
		$this->_log->debug('Trapping signals.');

		$handler = function($number) {
			switch ($number) {
				case SIGQUIT:
					$this->_log->debug('Received SIGQUIT, waiting and exiting.');

					$this->_break = true;
					$this->_connection->disconnect();
					exit(0);
				case SIGINT:
				case SIGTERM:
					$this->_log->debug('Received SIGTERM/SIGINT, killing exiting.');
					$this->_connection->disconnect();
					exit(1);
				case SIGUSR2:
					$this->_log->debug('Received SIGUSR2, pausing job processing.');

					$this->_paused = true;
					$this->_interval = 10;
					break;
				case SIGCONT:
					$this->_log->debug('Received SIGCONT, continuing to process jobs.');

					$this->_paused = false;
					$this->_interval = null;
					break;
			}
		};
		pcntl_signal(SIGQUIT, $handler);
		pcntl_signal(SIGINT,  $handler);
		pcntl_signal(SIGTERM, $handler);
		pcntl_signal(SIGUSR2, $handler);
		pcntl_signal(SIGCONT, $handler);
	}
protected function _trapSignals() {
		$this->_log->debug('Trapping signals.');

		$handler = function($number) {
			switch ($number) {
				case SIGQUIT:
					$this->_log->debug('Received SIGQUIT, waiting and exiting.');

					$this->_break = true;
					$this->_connection->disconnect();
					exit(0);
				case SIGINT:
				case SIGTERM:
					$this->_log->debug('Received SIGTERM/SIGINT, killing exiting.');
					$this->_connection->disconnect();
					exit(1);
				case SIGUSR2:
					$this->_log->debug('Received SIGUSR2, pausing job processing.');

					$this->_paused = true;
					$this->_interval = 10;
					break;
				case SIGCONT:
					$this->_log->debug('Received SIGCONT, continuing to process jobs.');

					$this->_paused = false;
					$this->_interval = null;
					break;
			}
		};
		pcntl_signal(SIGQUIT, $handler);
		pcntl_signal(SIGINT,  $handler);
		pcntl_signal(SIGTERM, $handler);
		pcntl_signal(SIGUSR2, $handler);
		pcntl_signal(SIGCONT, $handler);
	}
protected function _trapSignals ( ) { $ this -> _log -> debug ( 'Trapping signals.' ) ; $ handler = function ( $ number ) { switch ( $ number ) { case SIGQUIT : $ this -> _log -> debug ( 'Received SIGQUIT, waiting and exiting.' ) ; $ this -> _break = true ; $ this -> _connection -> disconnect ( ) ; exit ( 0 ) ; case SIGINT : case SIGTERM : $ this -> _log -> debug ( 'Received SIGTERM/SIGINT, killing exiting.' ) ; $ this -> _connection -> disconnect ( ) ; exit ( 1 ) ; case SIGUSR2 : $ this -> _log -> debug ( 'Received SIGUSR2, pausing job processing.' ) ; $ this -> _paused = true ; $ this -> _interval = 10 ; break ; case SIGCONT : $ this -> _log -> debug ( 'Received SIGCONT, continuing to process jobs.' ) ; $ this -> _paused = false ; $ this -> _interval = null ; break ; } } ; pcntl_signal ( SIGQUIT , $ handler ) ; pcntl_signal ( SIGINT , $ handler ) ; pcntl_signal ( SIGTERM , $ handler ) ; pcntl_signal ( SIGUSR2 , $ handler ) ; pcntl_signal ( SIGCONT , $ handler ) ; }
Registers signal handlers and handles signals once received.
Controls the current processing loop by setting object properties
and using the process manager.

@return void
Registers signal handlers and handles signals once received . Controls the current processing loop by setting object properties and using the process manager .