LimitIterator::__construct
(PHP 5 >= 5.1.0)
LimitIterator::__construct — ساخت LimitIterator
Description
ساخت LimitIterator از iterator به همراه offset شروع داده شده و بیشترین count.
Return Values
LimitIterator جدید.
Errors/Exceptions
ایجاد OutOfRangeException اگر offset کمتر از 0 باشد یا count کمتر از -1 بتشپ.
Examples
Example #1 مثال LimitIterator::__construct()
<?php
$ait = new ArrayIterator(array('a', 'b', 'c', 'd', 'e'));
$lit = new LimitIterator($ait, 1, 3);
foreach ($lit as $value) {
echo $value . "\n";
}
?>
The above example will output:
b c d
There are no user contributed notes for this page.
