note 91696 added to class.limititerator
| From: | uramihsayibok at osu1 dot php dot net | Date: | Tue, 23 Jun 2009 19:50:02 +0000 |
| Subject: | note 91696 added to class.limititerator | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157277@lists.php.net to get a copy of this message | ||
What isn't mentioned here is the constructor and the inherited getInnerIterator:
public function __construct(Iterator $iterator, $offset = null, $count = null)
public function getInnerIterator()
<?php
$array = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
$arrayiterator = new ArrayIterator($array);
$limititerator = new LimitIterator($arrayiterator, 3, 5);
foreach ($limititerator as $value) echo $value, " ";
// 3 4 5 6 7
foreach ($limititerator->getInnerIterator() as $value) echo $value, " ";
// 0 1 2 3 4 5 6 7 8 9
?>
----
Server IP: 64.71.164.2
Probable Submitter: 64.81.169.38
----
Manual Page -- http://www.php.net/manual/en/class.limititerator.php
Edit -- https://master.php.net/note/edit/91696
Del: integrated -- https://master.php.net/note/delete/91696/integrated
Del: useless -- https://master.php.net/note/delete/91696/useless
Del: bad code -- https://master.php.net/note/delete/91696/bad+code
Del: spam -- https://master.php.net/note/delete/91696/spam
Del: non-english -- https://master.php.net/note/delete/91696/non-english
Del: in docs -- https://master.php.net/note/delete/91696/in+docs
Del: other reasons-- https://master.php.net/note/delete/91696
Reject -- https://master.php.net/note/reject/91696
Search -- https://master.php.net/manage/user-notes.php