Erebot  latest
A modular IRC bot for PHP 7.0+
Erebot\CLI Class Reference

Provides the entry-point for Erebot. More...

Static Public Member Functions

static cleanupPidfile ($handle, $pidfile)
 
static run ()
 
static startupSighandler ($signum)
 

Detailed Description

Provides the entry-point for Erebot.

Erebot::CLI::run() is called statically by the "Erebot" script. This class then takes care of loading every configuration file and module required and connects the bot to the different IRC servers.

Definition at line 32 of file CLI.php.

Member Function Documentation

static Erebot\CLI::cleanupPidfile (   $handle,
  $pidfile 
)
static

Called after the bot has finished its execution to perform cleanup tasks.

Parameters
resource$handleOpen file handle on the pidfile.
string$pidfileName of the pidfile.
Returns
This method does not return anything.

Definition at line 68 of file CLI.php.

static Erebot\CLI::run ( )
static

Entry-point for Erebot.

Returns
This method never returns. Instead, the program exits with an appropriate return code when Erebot is stopped.

Definition at line 87 of file CLI.php.

References Erebot\Patches\patch().

static Erebot\CLI::startupSighandler (   $signum)
static

Signal handler used during startup.

Parameters
int$signumNumber of the signal received.
Postcondition
The current process exits with an exit code of 0 or 1, depending on the signal received.
Returns
This method does not return anything.

Definition at line 47 of file CLI.php.


The documentation for this class was generated from the following file: