|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
Abstract class for a filter which groups several (sub-)filters together. More...
Inheritance diagram for Erebot\Event\Match\CollectionAbstract:Public Member Functions | |
| __construct () | |
| & | add ($filter) |
| count () | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| & | remove ($filter) |
Public Member Functions inherited from Erebot\Interfaces\Event\Match | |
| match (\Erebot\Interfaces\Event\Base\Generic $event) | |
Protected Attributes | |
| $submatchers | |
| Subfilters of this filter. | |
Abstract class for a filter which groups several (sub-)filters together.
This abstract class also implements the ArrayAccess & Countable interfaces, so that you may count() the number of subfilters associated with it and/or get/set those subfilters using the usual array notation.
Definition at line 33 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::__construct | ( | ) |
Creates a new instance of this filter.
Definition at line 49 of file CollectionAbstract.php.
| & Erebot\Event\Match\CollectionAbstract::add | ( | $filter | ) |
Adds one or more subfilters to this filter.
| Erebot::Event::Match::CollectionAbstract | Returns this instance, so that multiple calls to Erebot::Event::Match::CollectionAbstract::add() can be chained up together. |
| $filter,... | One or more filters to add as subfilters of this filter. Duplicates are silently ignored. |
Definition at line 105 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::count | ( | ) |
Count elements of an object.
This method is executed when using the count() function on an object implementing the Countable interface.
| int | The custom count as an integer. |
Implements Countable.
Definition at line 61 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::offsetExists | ( | $offset | ) |
Whether or not an offset exists.
This method is executed when using isset() or empty() on objects implementing ArrayAccess.
| mixed | $offset | An offset to check for. |
| bool | true is returned when the offset exists, false when it doesn't. |
true. Implements ArrayAccess.
Definition at line 67 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::offsetGet | ( | $offset | ) |
Returns the value at specified offset.
This method is executed when checking if offset is empty().
| mixed | $offset | The offset to retrieve. |
| mixed | Value at the specified offset. |
Implements ArrayAccess.
Definition at line 73 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::offsetSet | ( | $offset, | |
| $value | |||
| ) |
Assigns a value to the specified offset.
| mixed | $offset | The offset to assign the value to. |
| mixed | $value | The value to set. |
Implements ArrayAccess.
Definition at line 79 of file CollectionAbstract.php.
| Erebot\Event\Match\CollectionAbstract::offsetUnset | ( | $offset | ) |
Unsets an offset.
| mixed | $offset | The offset to unset. |
(unset). Implements ArrayAccess.
Definition at line 88 of file CollectionAbstract.php.
| & Erebot\Event\Match\CollectionAbstract::remove | ( | $filter | ) |
Removes one or more subfilters from this filter.
| Erebot::Event::Match::CollectionAbstract | Returns this instance, so that multiple calls to Erebot::Event::Match::CollectionAbstract::remove() can be chained up together. |
| $filter,... | One or more filters to remove from this filter's subfilters. Filters which are not currently subfilters of this filter are silently ignored. |
Definition at line 132 of file CollectionAbstract.php.