note 91696 deleted from class.limititerator by danbrown

From: Date: Tue, 23 Jun 2009 23:52:11 +0000
Subject: note 91696 deleted from class.limititerator by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-157310@lists.php.net to get a copy of this message
Note Submitter: uramihsayibok, gmail, com ---- 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 ?>

« previous php.notes (#157310) next »