pluggarray / pluggarray
(C)oncept-Labs Pluggable Array
1.0.0.6
2025-03-13 23:59 UTC
Requires
- php: >=8.0
- dotaccess/dotarray: ^1.0
Suggests
- dotaccess/dotarray: DOT-Accessable array
- exrray/exrray: Array API
- jsonyx/jsonyx: Extended JSON parser with plugins. Use context variables, includes, .env, imports and custom plugins
README
Pluggable array container
Pluger Class
The Pluger class provides a flexible and extensible array container that allows you to plug in additional functionality as needed.
Features
- Dynamic Extensions: Easily extend the functionality of the array container by plugging in new features.
- Flexible API: Provides a simple and intuitive API for managing array data.
- Performance: Optimized for performance with minimal overhead.
Installation
To install the Pluger class, use Composer:
composer require pluggarray/pluggarray
Usage
Here's a basic example of how to use the Pluger class:
use Exrray\Plug\Pluger; // Create a new Pluger instance $pluger = new Pluger(); // Register plugins $pluger->register(new SomePlugin()); $pluger->register(new AnotherPlugin()); $pluger->register( function ($value, $path, &$data, $next) { $value .'- plugged'; return next($value, $path, $data) } ); // Apply plugins to data $data = ['key' => 'value']; $pluger->plug($data); $pluger->resolve($data);
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
License
This project is licensed under the MIT License. See the LICENSE file for details.