Arnaud Le Blanc
b83e243c23
Added CallbackFilterIterator and RecursiveCallbackFilterIterator classes
...
[DOC] This is a concrete FilterIterator which takes a callback as
constructor parameter, and uses this callback for filtering. This allows
to use FilterIterator without extending it.
CallbackFilterIterator Example:
$it = new ArrayIterator(range(1,100));
$it = new CallbackFilterIterator($it, function($value) {
return $value % 2;
});
foreach($it as $value) // ...
RecursiveCallbackFilterIterator Example:
$it = new RecursiveDirectoryIterator("/");
$it = new RecursiveCallbackFilterIterator($it, function($file, $k, $it) {
return $it->hasChildren() || $file->getSize() > 1024;
});
foreach(new RecursiveIteratorIterator($it) as $file) // ...
The callback takes the current value, the current key and the inner
iterator as parameters.
2011-03-27 20:13:27 +00:00
..
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-20 06:58:04 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-03-23 01:22:18 +00:00
2011-03-13 14:57:19 +00:00
2011-01-19 00:22:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-03-14 16:00:59 +00:00
2011-02-14 15:32:02 +00:00
2011-02-05 22:37:00 +00:00
2011-01-01 02:17:06 +00:00
2011-01-19 15:23:07 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-24 03:52:00 +00:00
2011-02-24 02:42:38 +00:00
2011-03-27 18:14:58 +00:00
2011-02-21 08:09:02 +00:00
2011-03-18 18:47:09 +00:00
2011-01-01 02:17:06 +00:00
2011-03-14 16:00:59 +00:00
2011-01-19 21:19:45 +00:00
2011-01-01 02:17:06 +00:00
2011-02-14 14:05:46 +00:00
2011-03-24 16:12:18 +00:00
2011-03-25 10:45:28 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-03-18 18:47:09 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-03-05 23:07:45 +00:00
2011-01-01 02:17:06 +00:00
2011-01-17 09:59:07 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-03-22 09:12:01 +00:00
2011-01-01 02:17:06 +00:00
2011-01-27 16:02:30 +00:00
2011-03-26 17:02:34 +00:00
2011-01-01 02:17:06 +00:00
2011-03-13 14:19:31 +00:00
2011-02-19 16:32:00 +00:00
2011-01-01 02:17:06 +00:00
2011-02-03 12:45:30 +00:00
2011-01-23 10:02:06 +00:00
2011-03-08 18:24:04 +00:00
2011-02-11 21:10:48 +00:00
2010-04-28 14:41:51 +00:00
2011-03-20 20:07:33 +00:00
2011-03-19 17:36:01 +00:00
2011-03-22 00:44:23 +00:00
2011-03-27 20:13:27 +00:00
2011-01-07 01:11:16 +00:00
2011-03-21 02:58:54 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-02-28 15:18:27 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-01-01 02:17:06 +00:00
2011-02-07 16:20:16 +00:00
2011-01-01 02:17:06 +00:00
2010-08-06 22:19:47 +00:00
2010-04-28 14:41:51 +00:00