protected function _fetch($check) { $this->valid = parent::_fetch($check); if (!$check || $this->valid) { $current = $this->current(); if ($this->flags & self::CALL_TOSTRING) { if (is_object($current)) { $this->strValue = $current->__toString(); } else { $this->strValue = (string) $current; } } else { if ($this->flags & self::TOSTRING_USE_INNER) { $this->strValue = $this->getInnerIterator()->__toString(); } } if ($this->fullCacheIterator) { $this->fullCacheIterator->offsetSet($this->key(), $current); } } return $this->valid; }