Erebot
latest
A modular IRC bot for PHP 7.0+
|
A filter that matches based on the type of event provided. More...
Public Member Functions | |
__construct ($type) | |
getType () | |
match (\Erebot\Interfaces\Event\Base\Generic $event) | |
setType ($types) | |
Protected Attributes | |
$type | |
Type to use in comparisons, as a string. | |
Erebot\Event\Match\Type::__construct | ( | $type | ) |
Creates a new instance of this filter.
string | object | $type | Type to match incoming events against. |
Definition at line 38 of file Type.php.
References Erebot\Event\Match\Type\$type, and Erebot\Event\Match\Type\setType().
Erebot\Event\Match\Type::getType | ( | ) |
Returns the type associated with this filter.
array | Array of types (as strings) associated with this filter. |
Definition at line 49 of file Type.php.
References Erebot\Event\Match\Type\$type.
Erebot\Event\Match\Type::setType | ( | $types | ) |
Sets the type used in comparisons.
$types | string|object|array Type(s) to match incoming events against, either as a string or as an instance of the type of match against. An array of strings/objects may also be passed; The filter will match if the incoming event is of any of the types given. |
Erebot::InvalidValueException | The given type is invalid. |
Definition at line 68 of file Type.php.
References Erebot\Event\Match\Type\$type.
Referenced by Erebot\Event\Match\Type\__construct().