clue/stream-filter
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Clue/stream-filter is a lightweight, modern package meant to facilitate stream filtering in PHP. It taps into the powerful stream filtering options PHP offers, providing a user-friendly API for creating stream filters. Among its possibilities, unlocking on-the-fly file formatting and data transformation while enhancing developer efficiency. With its SOLID design, it is designed for ease of use and customizability, making stream filtering accessible to a wide range of developers.
To utilize clue/stream-filter in your PHP development, you primarily need to install it using Composer by running composer require clue/stream-filter:^1.6
. You can then include the appropriate stream-filter functions within your code. For instance, to apply a filter when appending data, you would use Clue\StreamFilter\append($stream, function ($chunk) {return $chunk;});
The $stream
refers to a valid stream resource and the $callback
contains the functionality to be applied to each chunk of data. In a similar manner, you can prepend a filter with Clue\StreamFilter\prepend()
, remove a filter using Clue\StreamFilter\remove()
, or create a new filter function with Clue\StreamFilter\fun()
. Remember, if ever you need to import the PHP functions associated with Clue\StreamFilter, you would use use function Clue\StreamFilter\append;
allowing you to simplify function calls.
The clue/stream-filter documentation can be found in the readme file on its GitHub repository at https://github.com/clue/stream-filter.git. The readme file contains an overview of the package, detailed instructions on its usage including code examples, installation guidelines, and information on running tests. It also includes details about licensing and developer support. This document serves as the main point of reference for using the system, providing well-structured and easy-to-follow guidelines to help both novice and experienced developers make the most of this stream filtering tool in PHP.