private function setupDaemon(DaemonOptionsInterface $daemonOptions): void
    {
        $this->requestCount = 0;
        $this->requestLimit = (int) $daemonOptions->getOption(DaemonOptions::REQUEST_LIMIT);
        $this->memoryLimit  = (int) $daemonOptions->getOption(DaemonOptions::MEMORY_LIMIT);
        $this->autoShutdown = (bool) $daemonOptions->getOption(DaemonOptions::AUTO_SHUTDOWN);

        $timeLimit = (int) $daemonOptions->getOption(DaemonOptions::TIME_LIMIT);

        if (DaemonOptions::NO_LIMIT !== $timeLimit) {
            pcntl_alarm($timeLimit);
        }

        $this->installSignalHandlers();
    }
private function setupDaemon(DaemonOptionsInterface $daemonOptions): void
    {
        $this->requestCount = 0;
        $this->requestLimit = (int) $daemonOptions->getOption(DaemonOptions::REQUEST_LIMIT);
        $this->memoryLimit  = (int) $daemonOptions->getOption(DaemonOptions::MEMORY_LIMIT);
        $this->autoShutdown = (bool) $daemonOptions->getOption(DaemonOptions::AUTO_SHUTDOWN);

        $timeLimit = (int) $daemonOptions->getOption(DaemonOptions::TIME_LIMIT);

        if (DaemonOptions::NO_LIMIT !== $timeLimit) {
            pcntl_alarm($timeLimit);
        }

        $this->installSignalHandlers();
    }
private function setupDaemon ( DaemonOptionsInterface $ daemonOptions ) : void { $ this -> requestCount = 0 ; $ this -> requestLimit = ( int ) $ daemonOptions -> getOption ( DaemonOptions :: REQUEST_LIMIT ) ; $ this -> memoryLimit = ( int ) $ daemonOptions -> getOption ( DaemonOptions :: MEMORY_LIMIT ) ; $ this -> autoShutdown = ( bool ) $ daemonOptions -> getOption ( DaemonOptions :: AUTO_SHUTDOWN ) ; $ timeLimit = ( int ) $ daemonOptions -> getOption ( DaemonOptions :: TIME_LIMIT ) ; if ( DaemonOptions :: NO_LIMIT !== $ timeLimit ) { pcntl_alarm ( $ timeLimit ) ; } $ this -> installSignalHandlers ( ) ; }
Loads to configuration from the daemon options and installs signal
handlers.

@param DaemonOptionsInterface $daemonOptions
Loads to configuration from the daemon options and installs signal handlers .