메소드 |
설명 |
|
batch ( $chunkSize ) |
Returns a fluent iterator returning elements of this fluent iterator grouped in chunks of $chunkSize
Returns the |
|
cycle ( ) |
Returns a fluent iterator that cycles indefinitely over the elements of this fluent iterator. |
|
filter ( $predicate ) |
Returns a fluent iterator returning elements of this fluent iterator that satisfy a predicate. |
|
first ( ) : mixed |
Returns the first element in iterator or throws an Exception if iterator is empty |
|
firstOr ( $default ) : mixed |
Returns the first element in this iterator or defaultValue. |
|
from ( $iterator ) : FluentIterator |
Returns a fluent iterator that wraps $iterator |
|
fromArray ( array $array ) : FluentIterator |
Returns a fluent iterator for $array |
|
fromFunction ( $generator ) : FluentIterator |
Returns a fluent iterator that uses $function to generate elements
$function takes one argument which is the current position of the iterator. |
|
limit ( $number ) |
Returns a fluent iterator returning the first $number elements of of this fluent iterator. |
|
map ( $function ) |
Returns a fluent iterator that applies function to each element of this fluent iterator. |
|
reindex ( ) |
Returns an iterator that indexes elements numerically starting from 0 |
|
skip ( $number ) |
Returns a fluent iterator returning all but first $number elements of this fluent iterator. |
|
toArray ( ) : array |
Copies elements of this fluent iterator into an array. |
|