From 3ecf580903149735be74f23a9e34f4fc6ba20203 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Sat, 29 Mar 2014 21:53:53 +0000 Subject: [PATCH] CachingIterator::getCache() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333177 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/cachingiterator/getcache.xml | 71 +++++++++++++++++++--- 1 file changed, 64 insertions(+), 7 deletions(-) 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) +} +]]> + +