PHP Class phpstreams\operations\FlatMapOperation

This method does not preserve key => value relationships, as this would not make sense with nested arrays. Instead, it produces sequential keys.
Author: Bert Peters ([email protected])
Inheritance: extends phpstreams\Stream
Show file Open project: bertptrs/phpstreams Class Usage Examples

Public Methods

Method Description
__construct ( iterable $source, callable $unpacker ) Construct a new flatmap stream.
getIterator ( )
isSorted ( ) : boolean Override the parent sorting method.

Method Details

__construct() public method

Construct a new flatmap stream.
public __construct ( iterable $source, callable $unpacker )
$source iterable The source to read from.
$unpacker callable Some callback that convert source stream items to something iterable.

getIterator() public method

public getIterator ( )

isSorted() public method

Flatmapping does not neccesarily preserve sorting order, so this method always returns false.
public isSorted ( ) : boolean
return boolean