/** * Constructor. * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param boolean $useZipFile Write temp zip data to tempFile? Default FALSE * * @throws \PHPZip\Zip\Exception\InvalidPhpConfiguration In case of errors */ public function __construct($useZipFile = false) { parent::__construct(self::STREAM_CHUNK_SIZE); if ($useZipFile) { $this->_zipFile = tmpfile(); } else { $this->_zipData = ''; } }
/** * Constructor. * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param String $fileName The name of the Zip archive, in ISO-8859-1 (or ASCII) encoding, ie. "archive.zip". Optional, defaults to NULL, which means that no ISO-8859-1 encoded file name will be specified. * @param String $contentType Content mime type. Optional, defaults to "application/zip". * @param String $utf8FileName The name of the Zip archive, in UTF-8 encoding. Optional, defaults to NULL, which means that no UTF-8 encoded file name will be specified. * @param bool $inline Use Content-Disposition with "inline" instead of "attached". Optional, defaults to FALSE. * * @throws \PHPZip\Zip\Exception\BufferNotEmpty, HeadersSent, IncompatiblePhpVersion, InvalidPhpConfiguration In case of errors */ public function __construct($fileName = '', $contentType = self::CONTENT_TYPE, $utf8FileName = null, $inline = false) { parent::__construct(self::STREAM_CHUNK_SIZE); $this->buildResponseHeader($fileName, $contentType, $utf8FileName, $inline); }