Method |
Description |
|
__construct ( Traversabl\Traversable | array $source ) |
Construct a new stream from a traversable source. |
|
all ( callable $predicate = null ) : boolean |
Return true if all element matches the predicate. |
|
any ( callable $predicate = null ) : boolean |
Return true if any element matches the predicate. |
|
collect ( phpstreams\Collector $collector ) |
|
|
count ( ) : integer |
Count the number of elements in this stream. |
|
distinct ( type $strict = false ) : Stream |
Enforce distinct values. |
|
filter ( callable $filter ) : Stream |
Apply a filter to the current stream. |
|
flatMap ( callable $unpacker = null ) : Stream |
Flatten the underlying stream. |
|
getIterator ( ) |
|
|
isSorted ( ) : boolean |
Check whether this stream is definitely sorted. |
|
isValidSource ( mixed $source ) : boolean |
Check whether a source is valid. |
|
limit ( integer $limit ) : Stream |
Limit the stream to some number of elements. |
|
map ( callable $mapping ) : Stream |
Map the values in the stream to another stream. |
|
reduce ( mixed $identity, callable $binaryOp ) : mixed |
Reduce the stream using the given binary operation. |
|
skip ( integer $toSkip ) : Stream |
Skip the first few elements. |
|
sorted ( callable $sort = null ) : Stream |
Get a sorted view of the stream. |
|
toArray ( boolean $withKeys = true ) : array |
Convert this stream to an array. |
|