public function end_batch() { if ($this->batchQueue !== null) { $this->batchRun(); $this->batchQueue = null; } }