summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.stub.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-02-28 15:51:33 +0100
committerRemi Collet <remi@php.net>2020-03-02 16:48:53 +0100
commitfb8e2219074e425116977943bf3b495ad06be29c (patch)
treee0c3515ed4326b68774743cbe63f038e3ad659d5 /ext/zip/php_zip.stub.php
parentc932db865450112b7ce0b80d2cf8acb5e4da9cb1 (diff)
downloadphp-git-fb8e2219074e425116977943bf3b495ad06be29c.tar.gz
- add ZipArchive::FL_RECOMPRESS, FL_ENCRYPTED, FL_OVERWRITE, FL_LOCAL, FL_CENTRAL constants
- add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and addFromString methods - add "flags" options to ZipArchive::addGlob and addPattern methods keeping previous behavior having FL_OVERWRITE by default - add ZipArchive::replaceFile() method
Diffstat (limited to 'ext/zip/php_zip.stub.php')
-rw-r--r--ext/zip/php_zip.stub.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php
index 3e49c46413..1e3ceb6d07 100644
--- a/ext/zip/php_zip.stub.php
+++ b/ext/zip/php_zip.stub.php
@@ -58,13 +58,16 @@ class ZipArchive
public function getStatusString() {}
/** @return bool */
- public function addEmptyDir(string $dirname) {}
+ public function addEmptyDir(string $dirname, int $flags = 0) {}
/** @return bool */
- public function addFromString(string $name, string $content) {}
+ public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE) {}
/** @return bool */
- public function addFile(string $filepath, string $entryname = UNKNOWN, int $start = 0, int $length = 0) {}
+ public function addFile(string $filepath, string $entryname = UNKNOWN, int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE) {}
+
+ /** @return bool */
+ public function replaceFile(string $filepath, string $index, int $start = 0, int $length = 0, int $flags = 0) {}
/** @return array|false */
public function addGlob(string $pattern, int $flags = 0, $options = UNKNOWN) {}