|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
A filter that compares the target channel for an event with some predefined value. More...
Inheritance diagram for Erebot\Event\Match\Chan:Public Member Functions | |
| __construct ($chan) | |
| getChan () | |
| match (\Erebot\Interfaces\Event\Base\Generic $event) | |
| setChan ($chan) | |
Protected Attributes | |
| $chan | |
| Channel to use in the comparison, as a string. | |
A filter that compares the target channel for an event with some predefined value.
| Erebot\Event\Match\Chan::__construct | ( | $chan | ) |
Creates a new instance of the filter.
| $chan | string|object Channel to match incoming events against. |
| Erebot::InvalidValueException | The given chan is invalid. |
Definition at line 45 of file Chan.php.
References Erebot\Event\Match\Chan\$chan, and Erebot\Event\Match\Chan\setChan().
| Erebot\Event\Match\Chan::getChan | ( | ) |
Returns the channel associated with this filter.
| string | Channel associated with this filter. |
Definition at line 56 of file Chan.php.
References Erebot\Event\Match\Chan\$chan.
| Erebot\Event\Match\Chan::match | ( | \Erebot\Interfaces\Event\Base\Generic | $event | ) |
Decides whether the given event passes the filter or not.
| $event | An event to try to match to the criterion expressed by this filter. |
| bool | true if the event matches the criterion, false otherwise. |
Implements Erebot\Interfaces\Event\Match.
| Erebot\Event\Match\Chan::setChan | ( | $chan | ) |
Sets the channel used in comparisons.
| $chan | string|object Channel to match incoming events against. |
| Erebot::InvalidValueException | The given chan is invalid. |
Definition at line 70 of file Chan.php.
References Erebot\Event\Match\Chan\$chan, and Erebot\Utils\stringifiable().
Referenced by Erebot\Event\Match\Chan\__construct().