PHP 인터페이스 phpstreams\Collector

A collector can be thought of as a stateful reductor. It is initialized (in some way) and then elements are insterted one by one. Finally, the result is queried in the get method.
저자: Bert Peters ([email protected])
파일 보기 프로젝트 열기: bertptrs/phpstreams 0 사용 예제들

공개 메소드들

메소드 설명
add ( mixed $key, mixed $value ) Add a new value to the collector.
get ( ) : mixed Get the final result from the collector.

메소드 상세

add() 공개 메소드

Add a new value to the collector.
public add ( mixed $key, mixed $value )
$key mixed The current key.
$value mixed The current value.

get() 공개 메소드

Get the final result from the collector.
public get ( ) : mixed
리턴 mixed Whatever the result of this collector is.