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

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

 Method/function to call when this handler is triggered.
 Numeric code handled by this instance.

Detailed Description

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.

Constructor & Destructor Documentation

Erebot\NumericHandler::__construct ( callable  $callback,

Constructs a numeric event handler.

callable$callbackA callback function/method which will be called whenever the bot receives a message with the given $numeric code.
int | Erebot::NumericReference$numericThe particular numeric code this numeric handler will react to, or a reference to it.

Definition at line 50 of file NumericHandler.php.

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