TopicFilters
extends IteratorIterator
in package
Collection of TopicFilter objects used for filtering events by topics.
Implements iterator pattern for traversing multiple topic filters.
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructor.
- add() : void
- Adds a TopicFilter to the collection.
- count() : int
- Returns the number of TopicFilter objects in the collection.
- current() : TopicFilter
- Returns the current TopicFilter in the iteration.
- toArray() : array<string|int, TopicFilter>
Methods
__construct()
Constructor.
public
__construct(TopicFilter ...$responses) : mixed
Parameters
- $responses : TopicFilter
-
Variable number of TopicFilter objects
add()
Adds a TopicFilter to the collection.
public
add(TopicFilter $response) : void
Parameters
- $response : TopicFilter
-
The topic filter to add
count()
Returns the number of TopicFilter objects in the collection.
public
count() : int
Return values
int —The count of topic filters
current()
Returns the current TopicFilter in the iteration.
public
current() : TopicFilter
Return values
TopicFilter —The current topic filter
toArray()
public
toArray() : array<string|int, TopicFilter>
Return values
array<string|int, TopicFilter> —list of topic filters.