Liste de tous les membres
Additional Inherited Members |
| $input |
Documentation des constructeurs et destructeur
Class constructor.
- Paramètres:
-
mixed | $input | An optional argument to provide dependency injection for the application's input object. If the argument is a JInputCli object that object will become the application's input object, otherwise a default input object is created. |
mixed | $config | An optional argument to provide dependency injection for the application's config object. If the argument is a JRegistry object that object will become the application's config object, otherwise a default config object is created. |
mixed | $dispatcher | An optional argument to provide dependency injection for the application's event dispatcher. If the argument is a JDispatcher object that object will become the application's event dispatcher, if it is null then the default event dispatcher will be created based on the application's loadDispatcher() method. |
- Depuis:
- 11.1
- Exceptions:
-
Réimplémentée à partir de JApplicationCli.
Références $config, $dispatcher, JLog\add(), JLog\ERROR, et null.
Documentation des fonctions membres
JApplicationDaemon::changeIdentity |
( |
| ) |
|
|
protected |
Method to change the identity of the daemon process and resources.
- Renvoie:
- boolean True if identity successfully changed
- Depuis:
- 11.1
- Voir également:
- posix_setuid()
Références $file, $user, JLog\add(), JLog\ERROR, et JLog\INFO.
JApplicationDaemon::daemonize |
( |
| ) |
|
|
protected |
JApplicationDaemon::detach |
( |
| ) |
|
|
protected |
This is truly where the magic happens. This is where we fork the process and kill the parent process, which is essentially what turns the application into a daemon.
- Renvoie:
- void
- Depuis:
- 12.1
- Exceptions:
-
Références JLog\add(), et JLog\DEBUG.
JApplicationDaemon::fork |
( |
| ) |
|
|
protected |
Method to fork the process.
- Renvoie:
- integer The child process id to the parent process, zero to the child process.
- Depuis:
- 11.1
- Exceptions:
-
Références JLog\add(), JLog\DEBUG, et elseif.
JApplicationDaemon::gc |
( |
| ) |
|
|
protected |
Method to perform basic garbage collection and memory management in the sense of clearing the stat cache. We will probably call this method pretty regularly in our main loop.
- Renvoie:
- void
- Depuis:
- 11.1
JApplicationDaemon::isActive |
( |
| ) |
|
Check to see if the daemon is active. This does not assume that $this daemon is active, but only if an instance of the application is active as a daemon.
- Renvoie:
- boolean True if daemon is active.
- Depuis:
- 11.1
Références JLog\add(), et JLog\WARNING.
JApplicationDaemon::loadConfiguration |
( |
|
$data | ) |
|
Load an object or array into the application configuration object.
- Paramètres:
-
mixed | $data | Either an array or object to be loaded into the configuration object. |
- Renvoie:
- JCli Instance of $this to allow chaining.
- Depuis:
- 11.1
Réimplémentée à partir de JApplicationCli.
Références $data, $name, $options, et null.
JApplicationDaemon::pcntlChildExitStatus |
( |
|
$status | ) |
|
|
protected |
Method to return the exit code of a terminated child process.
- Paramètres:
-
integer | $status | The status parameter is the status parameter supplied to a successful call to pcntl_waitpid(). |
- Renvoie:
- integer The child process exit code.
- Voir également:
- pcntl_wexitstatus()
- Depuis:
- 11.3
JApplicationDaemon::pcntlFork |
( |
| ) |
|
|
protected |
Method to return the exit code of a terminated child process.
- Renvoie:
- integer On success, the PID of the child process is returned in the parent's thread of execution, and a 0 is returned in the child's thread of execution. On failure, a -1 will be returned in the parent's context, no child process will be created, and a PHP error is raised.
- Voir également:
- pcntl_fork()
- Depuis:
- 11.3
JApplicationDaemon::pcntlSignal |
( |
|
$signal, |
|
|
|
$handler, |
|
|
|
$restart = true |
|
) |
| |
|
protected |
Method to install a signal handler.
- Paramètres:
-
integer | $signal | The signal number. |
callback | $handler | The signal handler which may be the name of a user created function, or method, or either of the two global constants SIG_IGN or SIG_DFL. |
boolean | $restart | Specifies whether system call restarting should be used when this signal arrives. |
- Renvoie:
- boolean True on success.
- Voir également:
- pcntl_signal()
- Depuis:
- 11.3
JApplicationDaemon::pcntlWait |
( |
& |
$status, |
|
|
|
$options = 0 |
|
) |
| |
|
protected |
Method to wait on or return the status of a forked child.
- Paramètres:
-
integer | &$status | Status information. |
integer | $options | If wait3 is available on your system (mostly BSD-style systems), you can provide the optional options parameter. |
- Renvoie:
- integer The process ID of the child which exited, -1 on error or zero if WNOHANG was provided as an option (on wait3-available systems) and no child was available.
- Voir également:
- pcntl_wait()
- Depuis:
- 11.3
Références $options.
JApplicationDaemon::postFork |
( |
| ) |
|
|
protected |
Method to handle post-fork triggering of the onFork event.
- Renvoie:
- void
- Depuis:
- 12.1
JApplicationDaemon::restart |
( |
| ) |
|
JApplicationDaemon::setupSignalHandlers |
( |
| ) |
|
|
protected |
Method to attach the JApplicationDaemon signal handler to the known signals. Applications can override these handlers by using the pcntl_signal() function and attaching a different callback method.
- Renvoie:
- boolean
- Depuis:
- 11.1
- Voir également:
- pcntl_signal()
Références JLog\add(), et JLog\EMERGENCY.
JApplicationDaemon::shutdown |
( |
|
$restart = false | ) |
|
|
protected |
Method to shut down the daemon and optionally restart it.
- Paramètres:
-
boolean | $restart | True to restart the daemon on exit. |
- Renvoie:
- void
- Depuis:
- 11.1
Références $GLOBALS, JLog\add(), et JLog\INFO.
static JApplicationDaemon::signal |
( |
|
$signal | ) |
|
|
static |
Method to handle POSIX signals.
- Paramètres:
-
integer | $signal | The received POSIX signal. |
- Renvoie:
- void
- Depuis:
- 11.1
- Voir également:
- pcntl_signal()
- Exceptions:
-
Références JLog\add(), JLog\DEBUG, et JLog\EMERGENCY.
JApplicationDaemon::start |
( |
| ) |
|
JApplicationDaemon::stop |
( |
| ) |
|
JApplicationDaemon::writeProcessIdFile |
( |
| ) |
|
|
protected |
Documentation des données membres
JApplicationDaemon::$exiting = false |
|
protected |
JApplicationDaemon::$processId = 0 |
|
protected |
JApplicationDaemon::$running = false |
|
protected |
JApplicationDaemon::$signals |
|
staticprotected |
La documentation de cette classe a été générée à partir du fichier suivant :