diff options
| author | Marcus Boerger <helly@php.net> | 2006-07-21 19:57:36 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2006-07-21 19:57:36 +0000 |
| commit | 5b3d704bcdd9d7127c0956470e63032be3399ce5 (patch) | |
| tree | 0ea56ef92efec49fbee0cecb02ee37db55807a7d /ext/spl/internal/regexiterator.inc | |
| parent | a7cfcd6b35f9b45acb94dd5485efb8241ed880f2 (diff) | |
| download | php-git-5b3d704bcdd9d7127c0956470e63032be3399ce5.tar.gz | |
- Add control functions to RegexIterator
Diffstat (limited to 'ext/spl/internal/regexiterator.inc')
| -rwxr-xr-x | ext/spl/internal/regexiterator.inc | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/ext/spl/internal/regexiterator.inc b/ext/spl/internal/regexiterator.inc index fd923eb826..931bde0237 100755 --- a/ext/spl/internal/regexiterator.inc +++ b/ext/spl/internal/regexiterator.inc @@ -29,9 +29,9 @@ class RegexIterator implements FilterIterator const REPLACE = 4; /**< Mode: Replace the input key or current */ private $regex; /**< the regular expression to match against */ - private $flags; /**< special flags (self::USE_KEY) */ private $mode; /**< operation mode (one of self::MATCH, self::GET_MATCH, self::ALL_MATCHES, self::SPLIT) */ + private $flags; /**< special flags (self::USE_KEY) */ private $preg_flags;/**< PREG_* flags, see preg_match(), preg_match_all(), preg_split() */ private $key; /**< the value used for key() */ @@ -116,6 +116,55 @@ class RegexIterator implements FilterIterator { return $this->current; } + + /** @return current operation mode + */ + function getMode() + { + return $this->mode; + } + + /** @param mode new operaion mode + */ + function setMode($mode) + { + $this->mode = $mode; + } + + /** @return current operation flags + */ + function getFlags() + { + return $this->flags; + } + + /** @param flags new operaion flags + */ + function setFlags($flags) + { + $this->flags = $flags; + } + + /** @param mode new operaion mode + */ + function setMode($mode) + { + $this->mode = $mode; + } + + /** @return current PREG flags + */ + function getPregFlags() + { + return $this->preg_flags; + } + + /** @param flags new PREG flags + */ + function setPregFlags($preg_flags) + { + $this->preg_flags = $preg_flags; + } } ?>
\ No newline at end of file |
