summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.stub.php
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-09-29 12:02:07 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-09-29 14:28:37 +0200
commit1858b00d007d00ad822102df82a76aef2056b2d7 (patch)
tree03cec9d01fedbfb4320f6b90e324b2514794881b /ext/zip/php_zip.stub.php
parent31e8ce66049796b4f12fac99a518dba30f8b808a (diff)
downloadphp-git-1858b00d007d00ad822102df82a76aef2056b2d7.tar.gz
Add ZipArchive arginfo stubs
Diffstat (limited to 'ext/zip/php_zip.stub.php')
-rw-r--r--ext/zip/php_zip.stub.php127
1 files changed, 127 insertions, 0 deletions
diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php
index 3d0bfd82c8..e86abd6bed 100644
--- a/ext/zip/php_zip.stub.php
+++ b/ext/zip/php_zip.stub.php
@@ -54,3 +54,130 @@ function zip_entry_filesize($zip_entry) {}
* @return string|false
*/
function zip_entry_compressionmethod($zip_entry) {}
+
+class ZipArchive
+{
+ /** @return bool|int */
+ public function open(string $filename, int $flags = 0) {}
+
+ /** @return bool */
+ public function setPassword(string $password) {}
+
+ /** @return bool */
+ public function close() {}
+
+ /** @return int|false */
+ public function count() {}
+
+ /** @return string|false */
+ public function getStatusString() {}
+
+ /** @return bool */
+ public function addEmptyDir(string $dirname) {}
+
+ /** @return bool */
+ public function addFromString(string $name, string $content) {}
+
+ /** @return bool */
+ public function addFile(string $filepath, string $entryname = UNBEKANNT, int $start = 0, int $length = 0) {}
+
+ /** @return array|false */
+ public function addGlob(string $pattern, int $flags = 0, $options = UNKNOWN) {}
+
+ /** @return array|false */
+ public function addPattern(string $pattern, string $path = UNKNOWN, $options = UNKNOWN) {}
+
+ /** @return bool */
+ public function renameIndex(int $index, string $new_name) {}
+
+ /** @return bool */
+ public function renameName(string $name, string $new_name) {}
+
+ /** @return bool */
+ public function setArchiveComment(string $comment) {}
+
+ /** @return string|false */
+ public function getArchiveComment(int $flags = 0) {}
+
+ /** @return null|false */
+ public function setCommentIndex(int $index, string $comment) {}
+
+ /** @return null|false */
+ public function setCommentName(string $name, string $comment) {}
+
+ /** @return string|false */
+ public function getCommentIndex(int $index, int $flags = 0) {}
+
+ /** @return string|false */
+ public function getCommentName(string $name, int $flags = 0) {}
+
+ /** @return bool */
+ public function deleteIndex(int $index) {}
+
+ /** @return bool */
+ public function deleteName(string $name) {}
+
+ /** @return array|false */
+ public function statName(string $filename, int $flags = 0) {}
+
+ /** @return array|false */
+ public function statIndex(int $index, int $flags = 0) {}
+
+ /** @return int|false */
+ public function locateName(string $filename, int $flags = 0) {}
+
+ /** @return string|false */
+ public function getNameIndex(int $index, int $flags = 0) {}
+
+ /** @return bool */
+ public function unchangeArchive() {}
+
+ /** @return bool */
+ public function unchangeAll() {}
+
+ /** @return bool */
+ public function unchangeIndex(int $index) {}
+
+ /** @return bool */
+ public function unchangeName(string $name) {}
+
+ /** @return bool */
+ public function extractTo(string $pathto, $files = UNKNOWN) {}
+
+ /** @return string|false */
+ public function getFromName(string $entryname, int $len = 0, int $flags = 0) {}
+
+ /** @return string|false */
+ public function getFromIndex(int $index, int $len = 0, int $flags = 0) {}
+
+ /** @return resource|false */
+ public function getStream(string $entryname) {}
+
+#ifdef ZIP_OPSYS_DEFAULT
+ /** @return bool */
+ public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = 0) {}
+
+ /** @return bool */
+ public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = 0) {}
+
+ /** @return bool */
+ public function getExternalAttributesName(string $name, &$opsys, &$attr, int $flags = 0) {}
+
+ /** @return bool */
+ public function getExternalAttributesIndex(int $index, &$opsys, &$attr, int $flags = 0) {}
+#endif
+
+ /** @return bool */
+ public function setCompressionName(string $name, int $method, int $compflags = 0) {}
+
+ /** @return bool */
+ public function setCompressionIndex(int $index, int $method, int $compflags = 0) {}
+
+#ifdef HAVE_ENCRYPTION
+ /** @return bool */
+ public function setEncryptionName(string $name, int $method, string $password = UNKNOWN) {}
+
+ /** @return bool */
+ public function setEncryptionIndex(int $index, int $method, string $password = UNKNOWN) {}
+#endif
+}