aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/maennchen/zipstream-php/guides/Options.rst
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-11-07 19:23:35 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-11-08 16:43:29 +0100
commitfe30b5497593dcfb4445d72c99fa357011cebf46 (patch)
tree6d4d89fed5dcd52e26dd1e07e7cae04206c737d4 /vendor/maennchen/zipstream-php/guides/Options.rst
parentb00ae997a5dab923a99e1f1cccf35bb52eba9a62 (diff)
downloadvolse-hubzilla-fe30b5497593dcfb4445d72c99fa357011cebf46.tar.gz
volse-hubzilla-fe30b5497593dcfb4445d72c99fa357011cebf46.tar.bz2
volse-hubzilla-fe30b5497593dcfb4445d72c99fa357011cebf46.zip
Update php-epub-meta and use composer for dep handling.
Note that we upgrade to the 2.x branch of the dependency, as the 3.x branch requires PHP version 8.2 or later. There's no reason for us to move our minimum supported version of PHP just yet.
Diffstat (limited to 'vendor/maennchen/zipstream-php/guides/Options.rst')
-rw-r--r--vendor/maennchen/zipstream-php/guides/Options.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/vendor/maennchen/zipstream-php/guides/Options.rst b/vendor/maennchen/zipstream-php/guides/Options.rst
new file mode 100644
index 000000000..5e92e94d6
--- /dev/null
+++ b/vendor/maennchen/zipstream-php/guides/Options.rst
@@ -0,0 +1,66 @@
+Available options
+===============
+
+Here is the full list of options available to you. You can also have a look at
+``src/ZipStream.php`` file.
+
+.. code-block:: php
+
+ use ZipStream\ZipStream;
+
+ require_once 'vendor/autoload.php';
+
+ $zip = new ZipStream(
+ // Define output stream
+ // (argument is eiter a resource or implementing
+ // `Psr\Http\Message\StreamInterface`)
+ //
+ // Setup with `psr/http-message` & `guzzlehttp/psr7` dependencies
+ // required when using `Psr\Http\Message\StreamInterface`.
+ outputStream: $filePointer,
+
+ // Set the deflate level (default is 6; use -1 to disable it)
+ defaultDeflateLevel: 6,
+
+ // Add a comment to the zip file
+ comment: 'This is a comment.',
+
+ // Send http headers (default is true)
+ sendHttpHeaders: false,
+
+ // HTTP Content-Disposition.
+ // Defaults to 'attachment', where FILENAME is the specified filename.
+ // Note that this does nothing if you are not sending HTTP headers.
+ contentDisposition: 'attachment',
+
+ // Output Name for HTTP Content-Disposition
+ // Defaults to no name
+ outputName: "example.zip",
+
+ // HTTP Content-Type.
+ // Defaults to 'application/x-zip'.
+ // Note that this does nothing if you are not sending HTTP headers.
+ contentType: 'application/x-zip',
+
+ // Set the function called for setting headers.
+ // Default is the `header()` of PHP
+ httpHeaderCallback: header(...),
+
+ // Enable streaming files with single read where general purpose bit 3
+ // indicates local file header contain zero values in crc and size
+ // fields, these appear only after file contents in data descriptor
+ // block.
+ // Set to true if your input stream is remote
+ // (used with addFileFromStream()).
+ // Default is false.
+ defaultEnableZeroHeader: false,
+
+ // Enable zip64 extension, allowing very large archives
+ // (> 4Gb or file count > 64k)
+ // Default is true
+ enableZip64: true,
+
+ // Flush output buffer after every write
+ // Default is false
+ flushOutput: true,
+ );