diff options
| author | Marcus Boerger <helly@php.net> | 2005-07-28 21:09:02 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-07-28 21:09:02 +0000 |
| commit | 0b34e041e3d451089e5827d0aa2a942689b6b60c (patch) | |
| tree | 81ab4ef7c4ef5976d13d717bc76dbf04d4b1d80b /ext/spl/internal | |
| parent | d608181dc79fd65579f7cce171a35e027957887e (diff) | |
| download | php-git-0b34e041e3d451089e5827d0aa2a942689b6b60c.tar.gz | |
- Before we later run into BC trouble we split flags into two params mode
and flags now before branching for 5.1.
Diffstat (limited to 'ext/spl/internal')
| -rwxr-xr-x | ext/spl/internal/recursiveiteratoriterator.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/spl/internal/recursiveiteratoriterator.inc b/ext/spl/internal/recursiveiteratoriterator.inc index 66cffc4875..d77f9850da 100755 --- a/ext/spl/internal/recursiveiteratoriterator.inc +++ b/ext/spl/internal/recursiveiteratoriterator.inc @@ -12,7 +12,7 @@ define('RIT_LEAVES_ONLY', 0); define('RIT_SELF_FIRST', 1); define('RIT_CHILD_FIRST', 2); -define('RIT_CATCH_GET_CHILD', 256); +define('RIT_CATCH_GET_CHILD', 2); /** * @brief Iterates through recursive iterators @@ -34,20 +34,20 @@ class RecursiveIteratorIterator implements OuterIterator /** Construct from RecursiveIterator * * @param it RecursiveIterator to iterate - * @param flags Operation mode (one of): + * @param mode Operation mode (one of): * - RIT_LEAVES_ONLY only show leaves * - RIT_SELF_FIRST show parents prior to their childs * - RIT_CHILD_FIRST show all childs prior to their parent - * or'ed with the following flags: + * @param flags Control flags, zero or any combination of the following * - RIT_CATCH_GET_CHILD which catches exceptions during * getChildren() calls and simply jumps to the next * element. */ - function __construct(RecursiveIterator $it, $flags) + function __construct(RecursiveIterator $it, $mode = RIT_LEAVES_ONLY, $flags = 0) { $this->ait[0] = $it; - $this->mode = $flags & 0xFF; - $this->flags = $flags & ~0xFF; + $this->mode = $mode; + $this->flags = $flags; } /** Rewind to top iterator as set in constructor |
