2017 © Pedro Peláez
 

cakephp-plugin cakephp-chunk

Robotusers CakePHP Chunk plugin

image

robotusers/cakephp-chunk

Robotusers CakePHP Chunk plugin

  • Monday, May 21, 2018
  • by robertpustulka
  • Repository
  • 1 Watchers
  • 4 Stars
  • 136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 21 % Grown

The README.md

CakePHP Chunk plugin

Software License Build Status codecov, (*1)

This plugin allows to chunk results retrieved from a database in order to save memory., (*2)

Installation

composer require robotusers/cakephp-chunk
bin/cake plugin load Robotusers/Chunk

Using the plugin

The plugin provides a custom ResultSet class which accepts Cake\ORM\Query instance., (*3)

Example:, (*4)

$query = $table->find();
$results = new \Robotusers\Chunk\ORM\ResultSet($query);

foreach ($results as $result) {
    // do stuff
}

You can control how many elements are in one "chunk" (1000 by default):, (*5)

$query = $table->find();
$results = new \Robotusers\Chunk\ORM\ResultSet($query, ['size' => 100]);

The plugin provides also a behavior with chunk() method:, (*6)

$table->addBehavior('Robotusers/Chunk.Chunk');
$query = $table->find();
$results = $table->chunk($query, ['size' => 100]);

The Versions

21/05 2018

dev-master

9999999-dev https://github.com/robotusers/cakephp-chunk

Robotusers CakePHP Chunk plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

21/05 2018
13/06 2017

dev-finder

dev-finder https://github.com/robotusers/cakephp-chunk

Robotusers CakePHP Chunk plugin

  Sources   Download

The Requires

 

The Development Requires

13/06 2017

0.1.0-beta2

0.1.0.0-beta2 https://github.com/robotusers/cakephp-chunk

Robotusers CakePHP Chunk plugin

  Sources   Download

The Requires

 

The Development Requires

13/06 2017
12/06 2017

0.1.0-beta

0.1.0.0-beta https://github.com/robotusers/cakephp-chunk

Robotusers CakePHP Chunk plugin

  Sources   Download

The Requires

 

The Development Requires