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/cachingiterator.inc | 157 ----------------------------------- 1 file changed, 157 deletions(-) delete mode 100755 ext/spl/internal/cachingiterator.inc (limited to 'ext/spl/internal/cachingiterator.inc') diff --git a/ext/spl/internal/cachingiterator.inc b/ext/spl/internal/cachingiterator.inc deleted file mode 100755 index 1129793873..0000000000 --- a/ext/spl/internal/cachingiterator.inc +++ /dev/null @@ -1,157 +0,0 @@ -it = $it; - $this->flags = $flags & (0x0000FFFF); - $this->next(); - } - - /** Rewind the Iterator - */ - function rewind() - { - $this->it->rewind(); - $this->next(); - } - - /** Forward to the next element - */ - function next() - { - if ($this->valid = $this->it->valid()) { - $this->current = $this->it->current(); - $this->key = $this->it->key(); - if ($this->flags & self::CALL_TOSTRING) { - if (is_object($this->current)) { - $this->strValue = $this->current->__toString(); - } else { - $this->strValue = (string)$this->current; - } - } - } else { - $this->current = NULL; - $this->key = NULL; - $this->strValue = NULL; - } - $this->it->next(); - } - - /** @return whether teh iterator is valid - */ - function valid() - { - return $this->valid; - } - - /** @return whether there is one more element - */ - function hasNext() - { - return $this->it->valid(); - } - - /** @return the current element - */ - function current() - { - return $this->current; - } - - /** @return the current key - */ - function key() - { - return $this->key; - } - - /** Aggregate the inner iterator - * - * @param func Name of method to invoke - * @param params Array of parameters to pass to method - */ - function __call($func, $params) - { - return call_user_func_array(array($this->it, $func), $params); - } - - /** @return the string represenatation that was generated for the current - * element - * @throw exception when CALL_TOSTRING was not specified in constructor - */ - function __toString() - { - if ($this->flags & self::TOSTRING_USE_KEY) - { - return $this->key; - } - else if ($this->flags & self::TOSTRING_USE_CURRENT) - { - return $this->current; - } - if (!$this->flags & self::CALL_TOSTRING) - { - throw new exception('CachingIterator does not fetch string value (see CachingIterator::__construct)'); - } - return $this->strValue; - } - - /** - * @return The inner iterator - */ - function getInnerIterator() - { - return $this->it; - } -} - -?> \ No newline at end of file -- cgit v1.2.1