Commit Graph

66 Commits

Author SHA1 Message Date
Dmitry Stogov
ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Xinchen Hui
cc79496b97 Refactor Spl_Iterators to fixed default_properties change 2014-03-15 16:33:55 +08:00
Xinchen Hui
7dcb14ebcd We need to stash the object_ptr in fci 2014-02-28 17:12:53 +08:00
Xinchen Hui
1265850fef Add zend_iterator_dtor 2014-02-28 15:03:43 +08:00
Xinchen Hui
a5ce7d526e Revert "Move zend_objects_store_put out of zend_object_std_init"
This reverts commit 8ced4f0ac9.
2014-02-28 13:59:07 +08:00
Xinchen Hui
8ced4f0ac9 Move zend_objects_store_put out of zend_object_std_init 2014-02-28 12:59:51 +08:00
Dmitry Stogov
6306918ed2 Use better data structures (incomplete) 2014-02-12 23:54:04 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Nikita Popov
fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
e4a8fa6a15 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-09 13:29:51 +08:00
Xinchen Hui
6284ef112e Fixed bug #63236 (Executable permission on various source files) 2012-10-09 13:28:31 +08:00
Anatoliy Belsky
86428169d3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  reverted changes for #62477
2012-07-12 10:57:26 +02:00
Anatoliy Belsky
ad7eeba3c1 reverted changes for #62477 2012-07-12 10:54:14 +02:00
Anatoliy Belsky
40f8010a13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62477 LimitIterator int overflow
2012-07-11 22:29:45 +02:00
Anatoliy Belsky
b383ddf1e5 Fixed bug #62477 LimitIterator int overflow 2012-07-11 22:25:31 +02:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Peter Cowburn
9159e3d246 added (recursive)callbackfilteriterator to spl_classes() (bug #55287) 2011-07-27 08:48:08 +00:00
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
Adam Harvey
3571c955b5 Implement request #53659 (Implementing RegexIterator::getRegex() method). Patch
by Joshua Thijssen.
2011-01-06 02:32:02 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Marcus Boerger
ae8ef6c13a - MFH Add MultipleIterator (Arnaud, Marcus) 2008-07-22 22:54:35 +00:00
Marcus Boerger
e537b7934d - MFH Added RecursiveTreeIterator 2008-07-19 15:49:21 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
dcd3b197e7 MFH:- Fixed bug #43365 (Several enums have trailing commas) 2007-11-26 10:59:04 +00:00
Marcus Boerger
93583f9680 - MFH Add invert option to RegexIterator 2007-05-11 00:15:25 +00:00
Marcus Boerger
ac3b5ebbde - MFH Rearrange code: mode Countable from spl_array.c to spl_iterator.c 2007-02-08 22:17:40 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
478d42a3ac MFH 2006-09-28 22:33:06 +00:00
Marcus Boerger
45d09c71ba - Synch RegexIterator with HEAD 2006-07-20 22:54:21 +00:00
Marcus Boerger
55f0596fab - MFH:
. Upgrade RegexIterator capabilities, see docu
  . Update docu
  . Add test (which fails right now: iterator_049.phpt)
  . Add tests for new functionality
2006-07-16 21:12:32 +00:00
Marcus Boerger
e0844e09bd - MFH iterator_apply() 2006-06-07 09:44:42 +00:00
Marcus Boerger
e3f89f116a - MFH
. Make code exception safe
  . Make RecursiveRegexIterator::getChildren pass regex to inner ctor
  . Fix CachingIterator::__toString() in TOSTRING_USE_KEY mode
  . Add CachingIterator::getCache()
  . Add tests
2006-05-21 18:13:37 +00:00
Marcus Boerger
96916c95e8 - MFH Sync with head fixes part of an issue with iterator_(to_array|count) 2006-05-20 21:01:42 +00:00
Marcus Boerger
7d79686f45 - MFH Fixed CachingIterator issues with string conversion/__toString()
Partly by adding new mode TOSTRING_USE_INNER
2006-05-18 21:42:58 +00:00
Andrei Zmievski
9e0e89c5cf Rename RegExIterator -> RegexIterator.
Also rename recursive one.
2006-05-10 16:50:57 +00:00
Marcus Boerger
9afb3e041b - Update after api changes
- MFH
  . ArrayIterator/ArrayObject: function lookup caches and array functions
  . Added RegExIterator, RecursiveRegExIterator
  . Added (full) caching support for CachingIterator
2006-05-10 00:03:38 +00:00
Marcus Boerger
7dc322754a - Fix issues with not/double calling of constructors of SPL iterators
- Fix issues with info-class/file-class in SPL directory handling classes
- Add SimpleXMLElement::count()
- Drop erroneous RecursiveDirectoryIterator::getSubPathInfo()
- Drop dead code
- Add tests
- Update docu
2006-03-05 17:39:49 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Marcus Boerger
11f0ff9c1a - Update docu
- Synch class consts with HEAD
- Synch example RecursiveTreeIterator (as far as possible)
2005-10-08 19:09:58 +00:00
Marcus Boerger
42728f947c - Synch (to decrease number of diffs) 2005-10-03 15:43:40 +00:00
Marcus Boerger
06550ce8e0 - MFH: Rename here too 2005-09-24 23:48:58 +00:00
Marcus Boerger
7d918fae4c - Synch naming/move changes with HEAD
- Update tests/docu
# New functionality in CachingIterator/RecursiveIteratorIterator not MFHed
2005-09-18 17:15:04 +00:00
Marcus Boerger
b4dd030782 MFH:
- Add SplObjectStorage
- Add RecursiveFilterIterator
- Rename Observer to SplObserver
- Rename Subject to SplSubject
- Move SPL constants to class constants
- Update docu
2005-09-15 03:33:04 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Marcus Boerger
f3970b8076 - Add intefaces from zend_interface.h as macros 2005-03-06 22:57:45 +00:00