/** * Performs initial actions. * @return void */ public static function init() { Daemon::$startTime = time(); set_time_limit(0); Daemon::$defaultErrorLevel = error_reporting(); Daemon::$restrictErrorControl = (bool) Daemon::$config->restricterrorcontrol->value; ob_start(['\\PHPDaemon\\Core\\Daemon', 'outputFilter']); set_error_handler(['\\PHPDaemon\\Core\\Daemon', 'errorHandler']); Daemon::checkSupports(); Daemon::$initservervar = $_SERVER; Daemon::$masters = new Collection(); Daemon::$shm_wstate = new ShmEntity(Daemon::$config->pidfile->value, Daemon::SHM_WSTATE_SIZE, 'wstate', true); Daemon::openLogs(); }