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])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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.