|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| __construct (Iterator $it, $regex) | |
| accept () | |
| current () | |
| getInnerIterator () | |
| getRegex () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Member Functions | |
| __clone () | |
| fetch () | |
Private Attributes | |
| $regex | |
Regular expression filter for string iterators.
Instances of this class act as a filter around iterators whose elements are strings. In other words you can put an iterator into the constructor and the instance will only return elements which match the given regular expression.
Definition at line 22 of file keyfilter.inc.
| KeyFilter::__construct | ( | Iterator | $it, |
| $regex | |||
| ) |
Constructs a filter around an iterator whose elemnts are strings.
If the given iterator is of type spl_sequence then its rewind() method is called.
| it | Object that implements at least spl_forward |
| regex | Regular expression used as a filter. |
Definition at line 35 of file keyfilter.inc.
References $regex.
|
inherited |
Aggregate the inner iterator.
| func | Name of method to invoke |
| params | Array of parameters to pass to method |
Definition at line 121 of file filteriterator.inc.
|
protected |
| KeyFilter::accept | ( | ) |
Definition at line 43 of file keyfilter.inc.
References FilterIterator\getInnerIterator(), and FilterIterator\key().

|
inherited |
Implements Iterator.
Definition at line 97 of file filteriterator.inc.
Referenced by RegexFindFile\accept(), and FindFile\accept().
|
protectedinherited |
Fetch next element and store it.
Definition at line 61 of file filteriterator.inc.
References FilterIterator\accept().
Referenced by FilterIterator\next(), and FilterIterator\rewind().

|
inherited |
Implements OuterIterator.
Definition at line 111 of file filteriterator.inc.
References FilterIterator\$it.
Referenced by SearchIterator\__call(), DirectoryFilterDots\accept(), accept(), RecursiveRegexIterator\getChildren(), RecursiveFilterIterator\getChildren(), RecursiveRegexIterator\hasChildren(), RecursiveFilterIterator\hasChildren(), and DirectoryFilterDots\key().
| KeyFilter::getRegex | ( | ) |
Definition at line 50 of file keyfilter.inc.
References $regex.
|
inherited |
Implements Iterator.
Definition at line 90 of file filteriterator.inc.
Referenced by accept().
|
inherited |
Move to next element.
Implements Iterator.
Definition at line 75 of file filteriterator.inc.
References FilterIterator\fetch().

|
inherited |
Rewind the inner iterator.
Implements Iterator.
Definition at line 42 of file filteriterator.inc.
References FilterIterator\fetch().

|
inherited |
Implements Iterator.
Definition at line 83 of file filteriterator.inc.
|
private |
regular exoression used as filter
Definition at line 25 of file keyfilter.inc.
Referenced by __construct(), and getRegex().
1.8.5