public function setChunkSize($chunk_size) { if (!is_numeric($chunk_size)) { $chunk_size = 0; } $this->chunk_size = (int) max($chunk_size, 0); }