|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
A class representing a numeric event. More...
Inheritance diagram for Erebot\Event\Numeric:Public Member Functions | |
| __construct (\Erebot\Interfaces\Connection $connection, $numeric, $source, $target, $text) | |
| __destruct () | |
| Destructor. | |
| getCode () | |
| getConnection () | |
| getSource () | |
| getTarget () | |
| getText () | |
| preventDefault ($prevent=null) | |
Protected Attributes | |
| $connection | |
| The connection object this numeric event came from. | |
| $halt | |
| Whether the default action should be prevented or not. | |
| $numeric | |
| Numeric code. | |
| $source | |
| Source of the numeric event. | |
| $target | |
| Target of the numeric event; this is usually the bot. | |
| $text | |
| Content of the numeric event. | |
A class representing a numeric event.
Definition at line 27 of file Numeric.php.
| Erebot\Event\Numeric::__construct | ( | \Erebot\Interfaces\Connection | $connection, |
| $numeric, | |||
| $source, | |||
| $target, | |||
| $text | |||
| ) |
Constructs a numeric event.
| Erebot::Interfaces::Connection | $connection | The connection this message came from. |
| int | $numeric | The numeric code for the message. |
| string | $source | The source of the numeric message. This will generally be the name of an IRC server. |
| string | $target | The target of the numeric message. This will generally be the bot's nickname. |
| string | $text | The numeric content of the message. |
Definition at line 65 of file Numeric.php.
References Erebot\Event\Numeric\$connection, Erebot\Event\Numeric\$numeric, Erebot\Event\Numeric\$source, Erebot\Event\Numeric\$target, and Erebot\Event\Numeric\$text.
| Erebot\Event\Numeric::getCode | ( | ) |
Returns the numeric code associated with the current message.
| int | The numeric code of this message. |
Implements Erebot\Interfaces\Event\Numeric.
Definition at line 90 of file Numeric.php.
References Erebot\Event\Numeric\$numeric.
| Erebot\Event\Numeric::getConnection | ( | ) |
Returns the connection this event came from. This is the same object as that passed during construction.
| Erebot::Interfaces::Connection | The connection this event came from. |
Implements Erebot\Interfaces\Event\Base\Generic.
Definition at line 85 of file Numeric.php.
References Erebot\Event\Numeric\$connection.
| Erebot\Event\Numeric::getSource | ( | ) |
Returns the source of the current message. This will usually be some user's nickname or the name of an IRC server.
| Erebot::Interfaces::Identity | The source of this message. |
Implements Erebot\Interfaces\Event\Base\Source.
Definition at line 95 of file Numeric.php.
References Erebot\Event\Numeric\$source.
| Erebot\Event\Numeric::getTarget | ( | ) |
Returns the target of the current message. This will generally be the bot's nickname or some other user's nickname.
| string | The target of this message. |
Implements Erebot\Interfaces\Event\Base\Target.
Definition at line 100 of file Numeric.php.
References Erebot\Event\Numeric\$target.
| Erebot\Event\Numeric::getText | ( | ) |
Returns the raw content of the current message. No attempt is made at parsing the content.
| string | The content of this message. |
Implements Erebot\Interfaces\Event\Base\Text.
Definition at line 105 of file Numeric.php.
References Erebot\Event\Numeric\$text.
| Erebot\Event\Numeric::preventDefault | ( | $prevent = null | ) |
Prevents the default action associated with this type of event from occuring.
| mixed | $prevent | (optional) Whether the default action should be prevented (true) or not (false). You may also pass the value null to retrieve the current value without modifying it. |
| bool | Previous value (if modified by this call), or current value (if the value null was passed to $prevent). |
Implements Erebot\Interfaces\Event\Base\Generic.
Definition at line 110 of file Numeric.php.
References Erebot\Event\Numeric\$halt.