PHP Class Spork\Batch\Strategy\MongoStrategy

If you use this strategy you MUST close your Mongo connection on the spork.pre_fork event. $mongo = new Mongo(); $manager->addListener(Events::PRE_FORK, array($mongo, 'close'));
Inheritance: extends Spork\Batch\Strategy\AbstractStrategy
Show file Open project: kriswallsmith/spork

Public Methods

Method Description
__construct ( integer $size = 3, integer $skip ) Constructor.
createBatches ( $cursor )

Method Details

__construct() public method

Constructor.
public __construct ( integer $size = 3, integer $skip )
$size integer The number of batches to create
$skip integer The number of documents to skip

createBatches() public method

public createBatches ( $cursor )