PHP 클래스 phpstreams\Collectors
For compatibility reasons, the returned collectors are actuall classes,
rather than anonymous classes. This is an implementation detail, and should
not be relied upon. The implementing classes may be removed at any point.
파일 보기
프로젝트 열기: bertptrs/phpstreams
1 사용 예제들
공개 메소드들
메소드 |
설명 |
|
averaging ( ) : phpstreams\Collector |
Collector that returns the average of the given elements. |
|
joining ( string $delimiter = "" ) : phpstreams\Collector |
Get a collector that concatenates all the elements in the stream. |
|
reducing ( mixed $identity, callable $reduction ) : phpstreams\Collector |
Get a collector that applies the given reduction to the stream. |
|
비공개 메소드들
메소드 |
설명 |
|
__construct ( ) |
Hidden constructor, static class. |
|
메소드 상세
The return type of this collector is float, regardless of the type of
the stream elements.
public static averaging ( ) : phpstreams\Collector |
리턴 |
phpstreams\Collector |
|
Get a collector that concatenates all the elements in the stream.
public static joining ( string $delimiter = "" ) : phpstreams\Collector |
$delimiter |
string |
[optional] A delimiter to insert between
elements. Defaults to the empty string. |
리턴 |
phpstreams\Collector |
|
Get a collector that applies the given reduction to the stream.