mshumakov / decomposer
This package is abandoned and no longer maintained.
No replacement package was suggested.
Separation of a large piece of data into controlled fragments.
v3.1
2020-06-10 19:49 UTC
Requires
- php: ^7.2
Requires (Dev)
- phpunit/phpunit: ^8.0
README
This package is for big data fragmentation.
Installation
To install, download the package using the following command.
composer require mshumakov/decomposer
Example
A basic example of using a package to break data into fragments.
<?php declare(strict_types=1); use MSdev\Helper\Decomposer; require __DIR__ . '/../vendor/autoload.php'; $data = [ [...], [...], [...], ]; $batchSize = 10; // Fragment size $totalCount = count($data); // Total amount of data $params = [ 'hello' => 'world' ]; /** * In the response, we return the passed parameters * ($params) and a list of fragments (key - 'list'). * * p.s.: More information in the tests. */ $decomposer = new Decomposer(); $fragments = $decomposer->decompose( $batchSize, $totalCount, $params );