public function run($sessionId = null)
    {
        $this->sessionId = ($sessionId !== null) ? $sessionId : uniqid();

        if (function_exists('pcntl_signal')) {
            pcntl_signal(SIGTERM, [$this, 'signalHandler']);
            pcntl_signal(SIGINT, [$this, 'signalHandler']);
            pcntl_signal(SIGHUP, [$this, 'signalHandler']);
        }

        $this->daemon->start();
    }
public function run($sessionId = null)
    {
        $this->sessionId = ($sessionId !== null) ? $sessionId : uniqid();

        if (function_exists('pcntl_signal')) {
            pcntl_signal(SIGTERM, [$this, 'signalHandler']);
            pcntl_signal(SIGINT, [$this, 'signalHandler']);
            pcntl_signal(SIGHUP, [$this, 'signalHandler']);
        }

        $this->daemon->start();
    }
public function run ( $ sessionId = null ) { $ this -> sessionId = ( $ sessionId !== null ) ? $ sessionId : uniqid ( ) ; if ( function_exists ( 'pcntl_signal' ) ) { pcntl_signal ( SIGTERM , [ $ this , 'signalHandler' ] ) ; pcntl_signal ( SIGINT , [ $ this , 'signalHandler' ] ) ; pcntl_signal ( SIGHUP , [ $ this , 'signalHandler' ] ) ; } $ this -> daemon -> start ( ) ; }
Run as a daemon

@param string $sessionId

@return void
Run as a daemon