Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Interfaces\NumericHandler Interface Reference

Interface for numeric message handlers. More...

+ Inheritance diagram for Erebot\Interfaces\NumericHandler:

Public Member Functions

 getCallback ()
 
 getNumeric ()
 
 handleNumeric (\Erebot\Interfaces\Event\Numeric $numeric)
 
 setCallback (\Erebot\CallableInterface $callback)
 
 setNumeric ($numeric)
 

Detailed Description

Interface for numeric message handlers.

This interface provides the necessary methods to handle a numeric message from an IRC server.

Definition at line 30 of file NumericHandler.php.

Member Function Documentation

Erebot\Interfaces\NumericHandler::getCallback ( )

Returns the callback function/method associated with this handler.

Return values
callbackThe callback for this handler.

Implemented in Erebot\NumericHandler.

Erebot\Interfaces\NumericHandler::getNumeric ( )

Returns the numeric code associated with this handler.

Return values
int|Erebot::NumericReferenceThe numeric code for this handler, or a reference to it.

Implemented in Erebot\NumericHandler.

Erebot\Interfaces\NumericHandler::handleNumeric ( \Erebot\Interfaces\Event\Numeric  $numeric)

Given a numeric message, this methods tries to handle it.

Parameters
Erebot::Interfaces::Event::Numeric$numericThe numeric message to try to handle.
Note
It is the implementation's duty to make any appropriate checks on the message and take any action depending on the result of those checks.

Implemented in Erebot\NumericHandler.

Erebot\Interfaces\NumericHandler::setCallback ( \Erebot\CallableInterface  $callback)

Sets the callback function/method associated with this handler.

Parameters
Erebot::CallableInterface$callbackNew callable associated with this handler.

Implemented in Erebot\NumericHandler.

Erebot\Interfaces\NumericHandler::setNumeric (   $numeric)

Sets the numeric code associated with this handler.

Parameters
int | Erebot::NumericReference$numericNew numeric code to assign to this handler, or a reference to it.

Implemented in Erebot\NumericHandler.


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