Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 400 and 403] [Versions 401 and 403]
(no description)
File Size: | 608 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ZipStream:: (15 methods):
__construct()
addFile()
addFileFromPath()
addFileFromStream()
addFileFromPsr7Stream()
finish()
packFields()
send()
isLargeFile()
addToCdr()
addCdr64Eof()
sendHttpHeaders()
addCdr64Locator()
addCdrEof()
clear()
__construct(?string $name = null, ?ArchiveOptions $opt = null) X-Ref |
Create a new ZipStream object. Parameters: param: String $name - Name of output file (optional). param: ArchiveOptions $opt - Archive Options |
addFile(string $name, string $data, ?FileOptions $options = null) X-Ref |
addFile Add a file to the archive. param: String $name - path of file in archive (including directory). param: String $data - contents of file param: FileOptions $options |
addFileFromPath(string $name, string $path, ?FileOptions $options = null) X-Ref |
addFileFromPath Add a file at path to the archive. Note that large files may be compressed differently than smaller files; see the "Large File Support" section above for more information. param: String $name - name of file in archive (including directory path). param: String $path - path to file on disk (note: paths should be encoded using param: FileOptions $options return: void |
addFileFromStream(string $name, $stream, ?FileOptions $options = null) X-Ref |
addFileFromStream Add an open stream to the archive. param: String $name - path of file in archive (including directory). param: resource $stream - contents of file as a stream resource param: FileOptions $options return: void |
addFileFromPsr7Stream(string $name,StreamInterface $stream,?FileOptions $options = null) X-Ref |
addFileFromPsr7Stream Add an open stream to the archive. param: String $name - path of file in archive (including directory). param: StreamInterface $stream - contents of file as a stream resource param: FileOptions $options return: void |
finish() X-Ref |
finish Write zip footer to stream. Example: // add a list of files to the archive $files = array('foo.txt', 'bar.jpg'); foreach ($files as $path) $zip->addFile($path, file_get_contents($path)); // write footer to stream $zip->finish(); return: void |
packFields(array $fields) X-Ref |
Create a format string and argument list for pack(), then call pack() and return the result. param: array $fields return: string |
send(string $str) X-Ref |
Send string, sending HTTP headers if necessary. Flush output after write if configure option is set. param: String $str return: void |
isLargeFile(string $path) X-Ref |
Is this file larger than large_file_size? param: string $path return: bool |
addToCdr(File $file) X-Ref |
Save file attributes for trailing CDR record. param: File $file return: void |
addCdr64Eof() X-Ref |
Send ZIP64 CDR EOF (Central Directory Record End-of-File) record. return: void |
sendHttpHeaders() X-Ref |
Send HTTP headers for this stream. return: void |
addCdr64Locator() X-Ref |
Send ZIP64 CDR Locator (Central Directory Record Locator) record. return: void |
addCdrEof() X-Ref |
Send CDR EOF (Central Directory Record End-of-File) record. return: void |
clear() X-Ref |
Clear all internal variables. Note that the stream object is not usable after this. return: void |