PHPZip\Zip\File\Zip::onEndBuildResponseHeader PHP Method

onEndBuildResponseHeader() public method

Called by superclass when specialised action is needed at the end of sending the zip file response header.
Author: A. Grandt ([email protected])
Author: Greg Kappatos
    public function onEndBuildResponseHeader() {
        header('Connection: close');
        header('Content-Length: ' . $this->getArchiveSize());

        if (!is_resource($this->_zipFile)) {
            echo $this->_zipData;
        } else {
            rewind($this->_zipFile);

            while (!feof($this->_zipFile)) {
                echo fread($this->_zipFile, $this->streamChunkSize);
            }
        }
    }