hunts / stream.php
PHP implementation of collection query API similar to Java Stream API and .NET Linq
v0.1.0
2020-02-24 05:13 UTC
Requires
- php: >=7.2.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-04-24 14:39:12 UTC
README
The stream.php library is a PHP implementation of collection query API similar to Java Stream API and .NET Linq.
Table of Contents
Installation
Composer
composer require hunts/stream.php
Classes and methods
Usage
Class Stream
Description: Instantiate a new Stream object
Example
use Hunts\Stream; ... $stream = Stream::from([$user1, $user2, $user3]);
Class NumberStream
Description: Instantiate a new NumberStream object
Example
use Hunts\Stream; ... $stream = NumberStream::from([1, 2, 3]);
Global functions
Description: Instantiate a new Stream object via global function: stream() or number_stream()
Example
$stream = stream([$user1, $user2, $user3]); $stream = number_stream([1, 2, 3]);