Erebot  latest
A modular IRC bot for PHP 7.0+
Erebot\Event\Match\Chan Class Reference

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.
 

Detailed Description

A filter that compares the target channel for an event with some predefined value.

Note
Events that do not relate to a channel never match.

Definition at line 31 of file Chan.php.

Constructor & Destructor Documentation

Erebot\Event\Match\Chan::__construct (   $chan)

Creates a new instance of the filter.

Parameters
$chanstring|object Channel to match incoming events against.
Exceptions
Erebot::InvalidValueExceptionThe given chan is invalid.

Definition at line 45 of file Chan.php.

References Erebot\Event\Match\Chan\$chan, and Erebot\Event\Match\Chan\setChan().

Member Function Documentation

Erebot\Event\Match\Chan::getChan ( )

Returns the channel associated with this filter.

Return values
stringChannel associated with this filter.

Definition at line 56 of file Chan.php.

References Erebot\Event\Match\Chan\$chan.

Erebot\Event\Match\Chan::setChan (   $chan)

Sets the channel used in comparisons.

Parameters
$chanstring|object Channel to match incoming events against.
Exceptions
Erebot::InvalidValueExceptionThe given chan is invalid.

Definition at line 70 of file Chan.php.

References Erebot\Event\Match\Chan\$chan.

Referenced by Erebot\Event\Match\Chan\__construct().


The documentation for this class was generated from the following file: