From 88ec761548b66f58acc1a86cdd0fc164ca925476 Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Sun, 15 Oct 2006 21:09:28 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'. --- ext/spl/internal/regexiterator.inc | 163 ------------------------------------- 1 file changed, 163 deletions(-) delete mode 100755 ext/spl/internal/regexiterator.inc (limited to 'ext/spl/internal/regexiterator.inc') diff --git a/ext/spl/internal/regexiterator.inc b/ext/spl/internal/regexiterator.inc deleted file mode 100755 index 6548f911f7..0000000000 --- a/ext/spl/internal/regexiterator.inc +++ /dev/null @@ -1,163 +0,0 @@ -regex = $regex; - $this->flags = $flags; - $this->mode = $mode; - $this->preg_flags = $preg_flags; - } - - /** - * Match current or key against regular expression using mode, flags and - * preg_flags. - * - * @return whether this is a match - * - * @warning never call this twice for the same state - */ - function accept() - { - $matches = array(); - $this->key = parent::key(); - $this->current = parent::current(); - /* note that we use $this->current, rather than calling parent::current() */ - $subject = ($this->flags & self::USE_KEY) ? $this->key : $this->current; - switch($this->mode) - { - case self::MATCH: - return preg_match($this->regex, $subject, $matches, $this->preg_flags); - - case self::GET_MATCH: - $this->current = array(); - return preg_match($this->regex, $subject, $this->current, $this->preg_flags) > 0; - - case self::ALL_MATCHES: - $this->current = array(); - return preg_match_all($this->regex, $subject, $this->current, $this->preg_flags) > 0; - - case self::SPLIT: - $this->current = array(); - preg_split($this->regex, $subject, $this->current, $this->preg_flags) > 1; - - case self::REPLACE: - $this->current = array(); - $result = preg_replace($this->regex, $this->replacement, $subject); - if ($this->flags & self::USE_KEY) - { - $this->key = $result; - } - else - { - $this->current = $result; - } - } - } - - /** @return the key after accept has been called - */ - function key() - { - return $this->key; - } - - /** @return the current value after accept has been called - */ - function current() - { - 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; - } - - /** @return current PREG flags - */ - function getPregFlags() - { - return $this->preg_flags; - } - - /** @param preg_flags new PREG flags - */ - function setPregFlags($preg_flags) - { - $this->preg_flags = $preg_flags; - } -} - -?> \ No newline at end of file -- cgit v1.2.1