PHP code example of robotusers / cakephp-chunk

1. Go to this page and download the library: Download robotusers/cakephp-chunk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

robotusers / cakephp-chunk example snippets


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

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

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

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