From 80d3db1dcf8fe9ca66d4e3f2e2116d3bc39ae2b4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Jul 2022 22:26:21 +0300 Subject: upgrade idiorm to php8.1-patched version (aaronpk/idiorm) --- vendor/thecodingmachine/safe/generated/zip.php | 93 +++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 10 deletions(-) (limited to 'vendor/thecodingmachine/safe/generated/zip.php') diff --git a/vendor/thecodingmachine/safe/generated/zip.php b/vendor/thecodingmachine/safe/generated/zip.php index 8fd22bb9a..d4097eb16 100644 --- a/vendor/thecodingmachine/safe/generated/zip.php +++ b/vendor/thecodingmachine/safe/generated/zip.php @@ -21,10 +21,87 @@ function zip_entry_close($zip_entry): void } +/** + * Returns the compressed size of the specified directory entry. + * + * @param resource $zip_entry A directory entry returned by zip_read. + * @return int The compressed size. + * @throws ZipException + * + */ +function zip_entry_compressedsize($zip_entry): int +{ + error_clear_last(); + $result = \zip_entry_compressedsize($zip_entry); + if ($result === false) { + throw ZipException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the compression method of the directory entry specified + * by zip_entry. + * + * @param resource $zip_entry A directory entry returned by zip_read. + * @return string The compression method. + * @throws ZipException + * + */ +function zip_entry_compressionmethod($zip_entry): string +{ + error_clear_last(); + $result = \zip_entry_compressionmethod($zip_entry); + if ($result === false) { + throw ZipException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the actual size of the specified directory entry. + * + * @param resource $zip_entry A directory entry returned by zip_read. + * @return int The size of the directory entry. + * @throws ZipException + * + */ +function zip_entry_filesize($zip_entry): int +{ + error_clear_last(); + $result = \zip_entry_filesize($zip_entry); + if ($result === false) { + throw ZipException::createFromPhpError(); + } + return $result; +} + + +/** + * Returns the name of the specified directory entry. + * + * @param resource $zip_entry A directory entry returned by zip_read. + * @return string The name of the directory entry. + * @throws ZipException + * + */ +function zip_entry_name($zip_entry): string +{ + error_clear_last(); + $result = \zip_entry_name($zip_entry); + if ($result === false) { + throw ZipException::createFromPhpError(); + } + return $result; +} + + /** * Opens a directory entry in a zip file for reading. * - * @param resource $zip A valid resource handle returned by zip_open. + * @param resource $zip_dp A valid resource handle returned by zip_open. * @param resource $zip_entry A directory entry returned by zip_read. * @param string $mode Any of the modes specified in the documentation of * fopen. @@ -35,14 +112,10 @@ function zip_entry_close($zip_entry): void * @throws ZipException * */ -function zip_entry_open($zip, $zip_entry, string $mode = null): void +function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void { error_clear_last(); - if ($mode !== null) { - $result = \zip_entry_open($zip, $zip_entry, $mode); - } else { - $result = \zip_entry_open($zip, $zip_entry); - } + $result = \zip_entry_open($zip_dp, $zip_entry, $mode); if ($result === false) { throw ZipException::createFromPhpError(); } @@ -53,17 +126,17 @@ function zip_entry_open($zip, $zip_entry, string $mode = null): void * Reads from an open directory entry. * * @param resource $zip_entry A directory entry returned by zip_read. - * @param int $length The number of bytes to return. + * @param int $len The number of bytes to return. * * This should be the uncompressed length you wish to read. * @return string Returns the data read, empty string on end of a file. * @throws ZipException * */ -function zip_entry_read($zip_entry, int $length = 1024): string +function zip_entry_read($zip_entry, int $len = 1024): string { error_clear_last(); - $result = \zip_entry_read($zip_entry, $length); + $result = \zip_entry_read($zip_entry, $len); if ($result === false) { throw ZipException::createFromPhpError(); } -- cgit v1.2.3