symfony-bundles / patterns
SymfonyBundles 模式库
此包的官方仓库似乎已消失,因此该包已被冻结。
v1.2.0
2019-04-17 20:05 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/php-code-coverage: ^5.0|^7.0
- phpunit/phpunit: ^6.4|^8.0
This package is auto-updated.
Last update: 2020-11-17 23:42:38 UTC
README
安装
使用Composer要求包
composer require symfony-bundles/patterns
批量处理模式
当包的大小达到期望大小时调用监听器。
示例
$collection = (new \MongoDB\Client())->test->users; $batchProcessing = new BatchProcessing(100, $collection->find()); $batchProcessing->addListener(function(array $elements) { // do something with the elements of the package }); $batchProcessing->process();