52 $this->setCallback($callback);
53 $this->setNumeric($numeric);
58 $this->numeric = $numeric;
64 return $this->numeric;
69 $this->callback = $callback;
75 return $this->callback;
80 $ourNumeric = ($this->numeric instanceof \Erebot\NumericReference)
81 ? $this->numeric->getValue()
84 if ($numeric->getCode() !== $ourNumeric) {
88 $cb = $this->callback;
89 return $cb($this, $numeric);
handleNumeric(\Erebot\Interfaces\Event\Numeric $numeric)
setCallback(\Erebot\CallableInterface $callback)
Interface for something that can be called.
__construct(\Erebot\CallableInterface $callback, $numeric)
Interface for numeric message handlers.
A class to handle numeric events.
$numeric
Numeric code handled by this instance.
$callback
Method/function to call when this handler is triggered.