|
Erebot
latest
A modular IRC bot for PHP 7.0+
|
A class to handle numeric events. More...
Inheritance diagram for Erebot\NumericHandler:Public Member Functions | |
| __construct (callable $callback, $numeric) | |
| getCallback () | |
| getNumeric () | |
| handleNumeric (\Erebot\Interfaces\Event\Numeric $numeric) | |
| setCallback (callable $callback) | |
| setNumeric ($numeric) | |
Protected Attributes | |
| $callback | |
| Method/function to call when this handler is triggered. | |
| $numeric | |
| Numeric code handled by this instance. | |
A class to handle numeric events.
This class will call a given callback method/function whenever the bot receives a numeric event for the code this instance is meant to handle.
Definition at line 31 of file NumericHandler.php.
| Erebot\NumericHandler::__construct | ( | callable | $callback, |
| $numeric | |||
| ) |
Constructs a numeric event handler.
| callable | $callback | A callback function/method which will be called whenever the bot receives a message with the given $numeric code. |
| int | Erebot::NumericReference | $numeric | The particular numeric code this numeric handler will react to, or a reference to it. |
Definition at line 50 of file NumericHandler.php.