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

 $callback
 Method/function to call when this handler is triggered.
 
 $numeric
 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,
  $numeric 
)

Constructs a numeric event handler.

Parameters
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: