public function onBeginAddFile(array $params) { if (!is_resource($this->_zipFile) && ($this->offset + $params['gzLength']) > self::MEMORY_THRESHOLD) { $this->zipFlush(); } }