|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
A filter which matches when the source of the event equals some predefined value. More...
Inheritance diagram for Erebot\Event\Match\Source:Public Member Functions | |
| __construct ($source) | |
| getSource () | |
| match (\Erebot\Interfaces\Event\Base\Generic $event) | |
| setSource ($source) | |
Protected Attributes | |
| $source | |
| Source to use in the comparison, as a string. | |
A filter which matches when the source of the event equals some predefined value.
Definition at line 31 of file Source.php.
| Erebot\Event\Match\Source::__construct | ( | $source | ) |
Creates a new instance of the filter.
| $source | string|object Source to match incoming events against. |
| Erebot::InvalidValueException | The given source is invalid. |
Definition at line 45 of file Source.php.
References Erebot\Event\Match\Source\$source, and Erebot\Event\Match\Source\setSource().
| Erebot\Event\Match\Source::getSource | ( | ) |
Returns the source associated with this filter.
| string | Source associated with this filter. |
Definition at line 56 of file Source.php.
References Erebot\Event\Match\Source\$source.
| Erebot\Event\Match\Source::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.
Definition at line 79 of file Source.php.
| Erebot\Event\Match\Source::setSource | ( | $source | ) |
Sets the source used in comparisons.
| $source | string|object Source to match incoming events against. |
| Erebot::InvalidValueException | The given source is invalid. |
Definition at line 70 of file Source.php.
References Erebot\Event\Match\Source\$source, and Erebot\Utils\stringifiable().
Referenced by Erebot\Event\Match\Source\__construct().