PHP Class PHPDaemon\Thread\IPC

Inheritance: extends Generic
Afficher le fichier Open project: kakserpom/phpdaemon Class Usage Examples

Méthodes publiques

Свойство Type Description
$IPCManager
$fileWatcher PHPDaemon\FS\FileWatcher File watcher
$instancesCount array Instances count
$loop PHPDaemon\Core\EventLoop Event base
$reload boolean If true, we do not register signals automatically at start
$update boolean Update?

Protected Properties

Свойство Type Description
$breakMainLoop boolean Break main loop?
$delayedSigReg boolean If true, we do not register signals automatically at start
$reloadReady boolean Reload ready?

Méthodes publiques

Méthode Description
log ( string $message ) : void Log something
shutdown ( $hard = false ) : boolean | null Shutdown thread
sighup ( ) : void Handler of the SIGHUP (reload config) signal in worker process.
sigquit ( ) : void Handler of the SIGQUIT (graceful shutdown) signal in worker process.
sigttin ( ) : void Handler of the SIGTTIN signal in worker process.
sigunknown ( $signo ) : void Handler of non-known signals.
sigusr1 ( ) : void Handler of the SIGUSR1 (re-open log-file) signal in worker process.
sigusr2 ( ) : void Handler of the SIGUSR2 (graceful shutdown for update) signal in worker process.
sigxfsz ( ) : void Handler of the SIGXSFZ signal in worker process.

Méthodes protégées

Méthode Description
prepareSystemEnv ( ) : void Setup settings on start.
run ( ) : void Runtime of Worker process.
sigint ( ) : void Handler of the SIGINT (hard shutdown) signal in worker process.
sigterm ( ) : void Handler of the SIGTERM (graceful shutdown) signal in worker process.
sigtstp ( ) : void Handler of the SIGTSTP (graceful stop) signal in worker process.
update ( ) : void Reloads additional config-files on-the-fly.

Method Details

log() public méthode

Log something
public log ( string $message ) : void
$message string
Résultat void

prepareSystemEnv() protected méthode

Setup settings on start.
protected prepareSystemEnv ( ) : void
Résultat void

run() protected méthode

Runtime of Worker process.
protected run ( ) : void
Résultat void

shutdown() public méthode

Shutdown thread
public shutdown ( $hard = false ) : boolean | null
Résultat boolean | null - Ready?

sighup() public méthode

Handler of the SIGHUP (reload config) signal in worker process.
public sighup ( ) : void
Résultat void

sigint() protected méthode

Handler of the SIGINT (hard shutdown) signal in worker process.
protected sigint ( ) : void
Résultat void

sigquit() public méthode

Handler of the SIGQUIT (graceful shutdown) signal in worker process.
public sigquit ( ) : void
Résultat void

sigterm() protected méthode

Handler of the SIGTERM (graceful shutdown) signal in worker process.
protected sigterm ( ) : void
Résultat void

sigtstp() protected méthode

Handler of the SIGTSTP (graceful stop) signal in worker process.
protected sigtstp ( ) : void
Résultat void

sigttin() public méthode

Handler of the SIGTTIN signal in worker process.
public sigttin ( ) : void
Résultat void

sigunknown() public méthode

Handler of non-known signals.
public sigunknown ( $signo ) : void
Résultat void

sigusr1() public méthode

Handler of the SIGUSR1 (re-open log-file) signal in worker process.
public sigusr1 ( ) : void
Résultat void

sigusr2() public méthode

Handler of the SIGUSR2 (graceful shutdown for update) signal in worker process.
public sigusr2 ( ) : void
Résultat void

sigxfsz() public méthode

Handler of the SIGXSFZ signal in worker process.
public sigxfsz ( ) : void
Résultat void

update() protected méthode

Reloads additional config-files on-the-fly.
protected update ( ) : void
Résultat void

Property Details

$IPCManager public_oe property

public $IPCManager

$breakMainLoop protected_oe property

Break main loop?
protected bool $breakMainLoop
Résultat boolean

$delayedSigReg protected_oe property

If true, we do not register signals automatically at start
protected bool $delayedSigReg
Résultat boolean

$fileWatcher public_oe property

File watcher
public FileWatcher,PHPDaemon\FS $fileWatcher
Résultat PHPDaemon\FS\FileWatcher

$instancesCount public_oe property

Instances count
public array $instancesCount
Résultat array

$loop public_oe property

Event base
public EventLoop,PHPDaemon\Core $loop
Résultat PHPDaemon\Core\EventLoop

$reload public_oe property

If true, we do not register signals automatically at start
public bool $reload
Résultat boolean

$reloadReady protected_oe property

Reload ready?
protected bool $reloadReady
Résultat boolean

$update public_oe property

Update?
public bool $update
Résultat boolean