SymfonyBundles 模式库

此包的官方仓库似乎已消失,因此该包已被冻结。

v1.2.0 2019-04-17 20:05 UTC

This package is auto-updated.

Last update: 2020-11-17 23:42:38 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version License

安装

使用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();