Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Event\Match\Not Class Reference

A filter that negates the result of a sub-filter. More...

+ Inheritance diagram for Erebot\Event\Match\Not:

Public Member Functions

 __construct (\Erebot\Interfaces\Event\Match $filter)
 
 getFilter ()
 
 match (\Erebot\Interfaces\Event\Base\Generic $event)
 
 setFilter (\Erebot\Interfaces\Event\Match $filter)
 

Protected Attributes

 $filter
 Subfilter to negate.
 

Detailed Description

A filter that negates the result of a sub-filter.

This filter uses a sub-filter. It does not match whenever the sub-filter matches and vice versa. If can be used as a logical-NOT to express more complex filters.

Definition at line 31 of file Not.php.

Constructor & Destructor Documentation

Erebot\Event\Match\Not::__construct ( \Erebot\Interfaces\Event\Match  $filter)

Creates a new instance of this filter.

Parameters
Erebot::Interfaces::Event::Match$filterSubfilter to negate.

Definition at line 42 of file Not.php.

References Erebot\Event\Match\Not\setFilter().

Member Function Documentation

Erebot\Event\Match\Not::getFilter ( )

Returns the negated subfilter.

Return values
Erebot::Interfaces::Event::MatchNegated subfilter.

Definition at line 53 of file Not.php.

References Erebot\Event\Match\Not\$filter.

Erebot\Event\Match\Not::match ( \Erebot\Interfaces\Event\Base\Generic  $event)

Decides whether the given event passes the filter or not.

Parameters
$eventAn event to try to match to the criterion expressed by this filter.
Return values
booltrue if the event matches the criterion, false otherwise.

Implements Erebot\Interfaces\Event\Match.

Definition at line 69 of file Not.php.

Erebot\Event\Match\Not::setFilter ( \Erebot\Interfaces\Event\Match  $filter)

Sets the negated subfilter for this filter.

Parameters
Erebot::Interfaces::Event::Match$filterSubfilter to negate.

Definition at line 64 of file Not.php.

References Erebot\Event\Match\Not\$filter.

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


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