diff --git a/reference/spl/cachingiterator/getcache.xml b/reference/spl/cachingiterator/getcache.xml index 351fca9405..37a46dc375 100644 --- a/reference/spl/cachingiterator/getcache.xml +++ b/reference/spl/cachingiterator/getcache.xml @@ -4,18 +4,24 @@ CachingIterator::getCache - The getCache purpose + Retrieve the contents of the cache - + &reftitle.description; - public voidCachingIterator::getCache + public arrayCachingIterator::getCache - - &warn.undocumented.func; - + + Retrieve the contents of the cache. + + + + The CachingIterator::FULL_CACHE flag + must be being used. + + @@ -26,7 +32,58 @@ &reftitle.returnvalues; - Description... + An array containing the cache items. + + + + + &reftitle.errors; + + Throws a BadMethodCallException when the + CachingIterator::FULL_CACHE flag is not being used. + + + + + &reftitle.examples; + + + <methodname>CachingIterator::getCache</methodname> example + +next(); +$cache->next(); +var_dump($cache->getCache()); + +$cache->next(); +var_dump($cache->getCache()); +?> +]]> + + &example.outputs; + + + int(1) + [1]=> + int(2) +} +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} +]]> + +