summaryrefslogtreecommitdiff
path: root/ext/spl/examples/cachingiterator.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/examples/cachingiterator.inc')
-rw-r--r--ext/spl/examples/cachingiterator.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/spl/examples/cachingiterator.inc b/ext/spl/examples/cachingiterator.inc
index d828b88e7b..6a20652341 100644
--- a/ext/spl/examples/cachingiterator.inc
+++ b/ext/spl/examples/cachingiterator.inc
@@ -26,7 +26,7 @@ class CachingIterator
function next()
{
- if ($this->more = $this->it->hasMore()) {
+ if ($this->more = $this->it->valid()) {
$this->current = $this->it->current();
$this->key = $this->it->key();
if ($this->flags & CIT_CALL_TOSTRING) {
@@ -44,14 +44,14 @@ class CachingIterator
$this->it->next();
}
- function hasMore()
+ function valid()
{
return $this->more;
}
function hasNext()
{
- return $this->it->hasMore();
+ return $this->it->valid();
}
function current()