21 namespace Erebot\Event;
27 class Numeric implements \Erebot\Interfaces\Event\Numeric
77 $this->text = new \Erebot\TextWrapper((
string)
$text);
85 public function getConnection()
90 public function getCode()
95 public function getSource()
100 public function getTarget()
105 public function getText()
110 public function preventDefault($prevent = null)
113 if ($prevent !== null) {
114 if (!is_bool($prevent)) {
115 throw new \Erebot\InvalidValueException(
'Bad prevention value');
118 $this->halt = $prevent;
$source
Source of the numeric event.
$halt
Whether the default action should be prevented or not.
$text
Content of the numeric event.
$target
Target of the numeric event; this is usually the bot.
__construct(\Erebot\Interfaces\Connection $connection, $numeric, $source, $target, $text)
$connection
The connection object this numeric event came from.
A class representing a numeric event.