forked from HvyIndustries/crane-php-stubs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zip.php
1091 lines (993 loc) · 31.3 KB
/
zip.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of zip v.1.13.0
/**
* A file archive, compressed with Zip.
* @link http://php.net/manual/en/class.ziparchive.php
*/
class ZipArchive {
/**
* Create the archive if it does not exist.
* @link http://php.net/manual/en/zip.constants.php
*/
const CREATE = 1;
/**
* Error if archive already exists.
* @link http://php.net/manual/en/zip.constants.php
*/
const EXCL = 2;
/**
* Perform additional consistency checks on the archive, and error if they fail.
* @link http://php.net/manual/en/zip.constants.php
*/
const CHECKCONS = 4;
/**
* Always start a new archive, this mode will overwrite the file if
* it already exists.
* @link http://php.net/manual/en/zip.constants.php
*/
const OVERWRITE = 8;
/**
* Ignore case on name lookup
* @link http://php.net/manual/en/zip.constants.php
*/
const FL_NOCASE = 1;
/**
* Ignore directory component
* @link http://php.net/manual/en/zip.constants.php
*/
const FL_NODIR = 2;
/**
* Read compressed data
* @link http://php.net/manual/en/zip.constants.php
*/
const FL_COMPRESSED = 4;
/**
* Use original data, ignoring changes.
* @link http://php.net/manual/en/zip.constants.php
*/
const FL_UNCHANGED = 8;
/**
* better of deflate or store.
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_DEFAULT = -1;
/**
* stored (uncompressed).
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_STORE = 0;
/**
* shrunk
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_SHRINK = 1;
/**
* reduced with factor 1
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_REDUCE_1 = 2;
/**
* reduced with factor 2
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_REDUCE_2 = 3;
/**
* reduced with factor 3
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_REDUCE_3 = 4;
/**
* reduced with factor 4
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_REDUCE_4 = 5;
/**
* imploded
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_IMPLODE = 6;
/**
* deflated
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_DEFLATE = 8;
/**
* deflate64
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_DEFLATE64 = 9;
/**
* PKWARE imploding
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_PKWARE_IMPLODE = 10;
/**
* BZIP2 algorithm
* @link http://php.net/manual/en/zip.constants.php
*/
const CM_BZIP2 = 12;
const CM_LZMA = 14;
const CM_TERSE = 18;
const CM_LZ77 = 19;
const CM_WAVPACK = 97;
const CM_PPMD = 98;
/**
* No error.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_OK = 0;
/**
* Multi-disk zip archives not supported.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_MULTIDISK = 1;
/**
* Renaming temporary file failed.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_RENAME = 2;
/**
* Closing zip archive failed
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_CLOSE = 3;
/**
* Seek error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_SEEK = 4;
/**
* Read error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_READ = 5;
/**
* Write error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_WRITE = 6;
/**
* CRC error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_CRC = 7;
/**
* Containing zip archive was closed
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_ZIPCLOSED = 8;
/**
* No such file.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_NOENT = 9;
/**
* File already exists
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_EXISTS = 10;
/**
* Can't open file
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_OPEN = 11;
/**
* Failure to create temporary file.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_TMPOPEN = 12;
/**
* Zlib error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_ZLIB = 13;
/**
* Memory allocation failure
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_MEMORY = 14;
/**
* Entry has been changed
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_CHANGED = 15;
/**
* Compression method not supported.
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_COMPNOTSUPP = 16;
/**
* Premature EOF
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_EOF = 17;
/**
* Invalid argument
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_INVAL = 18;
/**
* Not a zip archive
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_NOZIP = 19;
/**
* Internal error
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_INTERNAL = 20;
/**
* Zip archive inconsistent
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_INCONS = 21;
/**
* Can't remove file
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_REMOVE = 22;
/**
* Entry has been deleted
* @link http://php.net/manual/en/zip.constants.php
*/
const ER_DELETED = 23;
/**
* Since PHP 5.6.0, PECL zip 1.12.4
* @link http://php.net/manual/en/zip.constants.php
*/
const OPSYS_DOS = 0;
const OPSYS_AMIGA = 1;
const OPSYS_OPENVMS = 2;
const OPSYS_UNIX = 3;
const OPSYS_VM_CMS = 4;
const OPSYS_ATARI_ST = 5;
const OPSYS_OS_2 = 6;
const OPSYS_MACINTOSH = 7;
const OPSYS_Z_SYSTEM = 8;
const OPSYS_Z_CPM = 9;
const OPSYS_WINDOWS_NTFS = 10;
const OPSYS_MVS = 11;
const OPSYS_VSE = 12;
const OPSYS_ACORN_RISC = 13;
const OPSYS_VFAT = 14;
const OPSYS_ALTERNATE_MVS = 15;
const OPSYS_BEOS = 16;
const OPSYS_TANDEM = 17;
const OPSYS_OS_400 = 18;
const OPSYS_OS_X = 19;
const OPSYS_DEFAULT = 3;
/**
* <p style="margin-top:0;">Status of the Zip Archive</p>
* @var int
*/
public $status;
/**
* <p style="margin-top:0;">System status of the Zip Archive</p>
* @var int
*/
public $statusSys;
/**
* <p style="margin-top:0;">Number of files in archive</p>
* @var int
*/
public $numFiles;
/**
* <p style="margin-top:0;">File name in the file system</p>
* @var string
*/
public $filename;
/**
* <p style="margin-top:0;">Comment for the archive</p>
* @var string
*/
public $comment;
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Open a ZIP file archive
* @link http://php.net/manual/en/ziparchive.open.php
* @param string $filename <p>
* The file name of the ZIP archive to open.
* </p>
* @param int $flags [optional] <p>
* The mode to use to open the archive.
* <p>
* <b>ZipArchive::OVERWRITE</b>
* </p>
* @return mixed <i>Error codes</i>
* <p>
* Returns <b>TRUE</b> on success or the error code.
* <p>
* <b>ZipArchive::ER_EXISTS</b>
* </p>
* <p>
* File already exists.
* </p>
* <p>
* <b>ZipArchive::ER_INCONS</b>
* </p>
* <p>
* Zip archive inconsistent.
* </p>
* <p>
* <b>ZipArchive::ER_INVAL</b>
* </p>
* <p>
* Invalid argument.
* </p>
* <p>
* <b>ZipArchive::ER_MEMORY</b>
* </p>
* <p>
* Malloc failure.
* </p>
* <p>
* <b>ZipArchive::ER_NOENT</b>
* </p>
* <p>
* No such file.
* </p>
* <p>
* <b>ZipArchive::ER_NOZIP</b>
* </p>
* <p>
* Not a zip archive.
* </p>
* <p>
* <b>ZipArchive::ER_OPEN</b>
* </p>
* <p>
* Can't open file.
* </p>
* <p>
* <b>ZipArchive::ER_READ</b>
* </p>
* <p>
* Read error.
* </p>
* <p>
* <b>ZipArchive::ER_SEEK</b>
* </p>
* <p>
* Seek error.
* </p>
* </p>
*/
public function open(string $filename, int $flags = null) {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)<br/>
* Set the password for the active archive
* @link http://php.net/manual/en/ziparchive.setpassword.php
* @param string $password <p>
* The password to be used for the archive.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setPassword(string $password): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Close the active archive (opened or newly created)
* @link http://php.net/manual/en/ziparchive.close.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function close(): bool {}
/**
* (PHP 5 >= 5.2.7, PHP 7)<br/>
* Returns the status error message, system and/or zip messages
* @link http://php.net/manual/en/ziparchive.getstatusstring.php
* @return string a string with the status message on success or <b>FALSE</b> on failure.
*/
public function getStatusString(): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.8.0)<br/>
* Add a new directory
* @link http://php.net/manual/en/ziparchive.addemptydir.php
* @param string $dirname <p>
* The directory to add.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addEmptyDir(string $dirname): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Add a file to a ZIP archive using its contents
* @link http://php.net/manual/en/ziparchive.addfromstring.php
* @param string $localname <p>
* The name of the entry to create.
* </p>
* @param string $contents <p>
* The contents to use to create the entry. It is used in a binary
* safe mode.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addFromString(string $localname, string $contents): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Adds a file to a ZIP archive from the given path
* @link http://php.net/manual/en/ziparchive.addfile.php
* @param string $filename <p>
* The path to the file to add.
* </p>
* @param string $localname [optional] <p>
* If supplied, this is the local name inside the ZIP archive that will override the <i>filename</i>.
* </p>
* @param int $start [optional] <p>
* This parameter is not used but is required to extend <b>ZipArchive</b>.
* </p>
* @param int $length [optional] <p>
* This parameter is not used but is required to extend <b>ZipArchive</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addFile(string $filename, string $localname = null, int $start = 0, int $length = 0): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL zip >= 1.9.0)<br/>
* Add files from a directory by glob pattern
* @link http://php.net/manual/en/ziparchive.addglob.php
* @param string $pattern <p>
* A <b>glob</b> pattern against which files will be matched.
* </p>
* @param int $flags [optional] <p>
* A bit mask of glob() flags.
* </p>
* @param array $options [optional] <p>
* An associative array of options. Available options are:
* <p>
* "add_path"
* </p>
* <p>
* Prefix to prepend when translating to the local path of the file within
* the archive. This is applied after any remove operations defined by the
* "remove_path" or "remove_all_path"
* options.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addGlob(string $pattern, int $flags = 0, array $options = array()): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL zip >= 1.9.0)<br/>
* Add files from a directory by PCRE pattern
* @link http://php.net/manual/en/ziparchive.addpattern.php
* @param string $pattern <p>
* A PCRE pattern against which files will be matched.
* </p>
* @param string $path [optional] <p>
* The directory that will be scanned. Defaults to the current working directory.
* </p>
* @param array $options [optional] <p>
* An associative array of options accepted by <b>ZipArchive::addGlob</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function addPattern(string $pattern, string $path = ".", array $options = array()): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Renames an entry defined by its index
* @link http://php.net/manual/en/ziparchive.renameindex.php
* @param int $index <p>
* Index of the entry to rename.
* </p>
* @param string $newname <p>
* New name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function renameIndex(int $index, string $newname): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Renames an entry defined by its name
* @link http://php.net/manual/en/ziparchive.renamename.php
* @param string $name <p>
* Name of the entry to rename.
* </p>
* @param string $newname <p>
* New name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function renameName(string $name, string $newname): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)<br/>
* Set the comment of a ZIP archive
* @link http://php.net/manual/en/ziparchive.setarchivecomment.php
* @param string $comment <p>
* The contents of the comment.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setArchiveComment(string $comment): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Returns the Zip archive comment
* @link http://php.net/manual/en/ziparchive.getarchivecomment.php
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* comment is returned.
* </p>
* @return string the Zip archive comment or <b>FALSE</b> on failure.
*/
public function getArchiveComment(int $flags = null): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)<br/>
* Set the comment of an entry defined by its index
* @link http://php.net/manual/en/ziparchive.setcommentindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @param string $comment <p>
* The contents of the comment.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setCommentIndex(int $index, string $comment): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)<br/>
* Set the comment of an entry defined by its name
* @link http://php.net/manual/en/ziparchive.setcommentname.php
* @param string $name <p>
* Name of the entry.
* </p>
* @param string $comment <p>
* The contents of the comment.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setCommentName(string $name, string $comment): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)<br/>
* Returns the comment of an entry using the entry index
* @link http://php.net/manual/en/ziparchive.getcommentindex.php
* @param int $index <p>
* Index of the entry
* </p>
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* comment is returned.
* </p>
* @return string the comment on success or <b>FALSE</b> on failure.
*/
public function getCommentIndex(int $index, int $flags = null): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)<br/>
* Returns the comment of an entry using the entry name
* @link http://php.net/manual/en/ziparchive.getcommentname.php
* @param string $name <p>
* Name of the entry
* </p>
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* comment is returned.
* </p>
* @return string the comment on success or <b>FALSE</b> on failure.
*/
public function getCommentName(string $name, int $flags = null): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* delete an entry in the archive using its index
* @link http://php.net/manual/en/ziparchive.deleteindex.php
* @param int $index <p>
* Index of the entry to delete.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function deleteIndex(int $index): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* delete an entry in the archive using its name
* @link http://php.net/manual/en/ziparchive.deletename.php
* @param string $name <p>
* Name of the entry to delete.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function deleteName(string $name): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Get the details of an entry defined by its name.
* @link http://php.net/manual/en/ziparchive.statname.php
* @param string $name <p>
* Name of the entry
* </p>
* @param int $flags [optional] <p>
* The flags argument specifies how the name lookup should be done.
* Also, <b>ZipArchive::FL_UNCHANGED</b> may be ORed to it to request
* information about the original file in the archive,
* ignoring any changes made.
* <p>
* <b>ZipArchive::FL_NOCASE</b>
* </p>
* @return array an array containing the entry details or <b>FALSE</b> on failure.
*/
public function statName(string $name, int $flags = null): array {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Get the details of an entry defined by its index.
* @link http://php.net/manual/en/ziparchive.statindex.php
* @param int $index <p>
* Index of the entry
* </p>
* @param int $flags [optional] <p>
* <b>ZipArchive::FL_UNCHANGED</b> may be ORed to it to request
* information about the original file in the archive,
* ignoring any changes made.
* </p>
* @return array an array containing the entry details or <b>FALSE</b> on failure.
*/
public function statIndex(int $index, int $flags = null): array {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Returns the index of the entry in the archive
* @link http://php.net/manual/en/ziparchive.locatename.php
* @param string $name <p>
* The name of the entry to look up
* </p>
* @param int $flags [optional] <p>
* The flags are specified by ORing the following values,
* or 0 for none of them.
* <p>
* <b>ZipArchive::FL_NOCASE</b>
* </p>
* @return int the index of the entry on success or <b>FALSE</b> on failure.
*/
public function locateName(string $name, int $flags = null): int {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Returns the name of an entry using its index
* @link http://php.net/manual/en/ziparchive.getnameindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* name is returned.
* </p>
* @return string the name on success or <b>FALSE</b> on failure.
*/
public function getNameIndex(int $index, int $flags = null): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Revert all global changes done in the archive.
* @link http://php.net/manual/en/ziparchive.unchangearchive.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function unchangeArchive(): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Undo all changes done in the archive
* @link http://php.net/manual/en/ziparchive.unchangeall.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function unchangeAll(): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Revert all changes done to an entry at the given index
* @link http://php.net/manual/en/ziparchive.unchangeindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function unchangeIndex(int $index): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.5.0)<br/>
* Revert all changes done to an entry with the given name.
* @link http://php.net/manual/en/ziparchive.unchangename.php
* @param string $name <p>
* Name of the entry.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function unchangeName(string $name): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Extract the archive contents
* @link http://php.net/manual/en/ziparchive.extractto.php
* @param string $destination <p>
* Location where to extract the files.
* </p>
* @param mixed $entries [optional] <p>
* The entries to extract. It accepts either a single entry name or
* an array of names.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function extractTo(string $destination, $entries = null): bool {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Returns the entry contents using its name
* @link http://php.net/manual/en/ziparchive.getfromname.php
* @param string $name <p>
* Name of the entry
* </p>
* @param int $length [optional] <p>
* The length to be read from the entry. If 0, then the
* entire entry is read.
* </p>
* @param int $flags [optional] <p>
* The flags to use to find the entry. The following values may
* be ORed.
* <p>
* <b>ZipArchive::FL_UNCHANGED</b>
* </p>
* @return string the contents of the entry on success or <b>FALSE</b> on failure.
*/
public function getFromName(string $name, int $length = 0, int $flags = null): string {}
/**
* (No version information available, might only be in Git)<br/>
* Returns the entry contents using its index
* @link http://php.net/manual/en/ziparchive.getfromindex.php
* @param int $index <p>
* Index of the entry
* </p>
* @param int $length [optional] <p>
* The length to be read from the entry. If 0, then the
* entire entry is read.
* </p>
* @param int $flags [optional] <p>
* The flags to use to open the archive. the following values may
* be ORed to it.
* <p>
* <b>ZipArchive::FL_UNCHANGED</b>
* </p>
* @return string the contents of the entry on success or <b>FALSE</b> on failure.
*/
public function getFromIndex(int $index, int $length = 0, int $flags = null): string {}
/**
* (PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)<br/>
* Get a file handler to the entry defined by its name (read only).
* @link http://php.net/manual/en/ziparchive.getstream.php
* @param string $name <p>
* The name of the entry to use.
* </p>
* @return resource a file pointer (resource) on success or <b>FALSE</b> on failure.
*/
public function getStream(string $name) {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)<br/>
* Set the external attributes of an entry defined by its name
* @link http://php.net/manual/en/ziparchive.setexternalattributesname.php
* @param string $name <p>
* Name of the entry.
* </p>
* @param int $opsys <p>
* The operating system code defined by one of the ZipArchive::OPSYS_ constants.
* </p>
* @param int $attr <p>
* The external attributes. Value depends on operating system.
* </p>
* @param int $flags [optional] <p>
* Optional flags. Currently unused.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = null): bool {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)<br/>
* Set the external attributes of an entry defined by its index
* @link http://php.net/manual/en/ziparchive.setexternalattributesindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @param int $opsys <p>
* The operating system code defined by one of the ZipArchive::OPSYS_ constants.
* </p>
* @param int $attr <p>
* The external attributes. Value depends on operating system.
* </p>
* @param int $flags [optional] <p>
* Optional flags. Currently unused.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = null): bool {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)<br/>
* Retrieve the external attributes of an entry defined by its name
* @link http://php.net/manual/en/ziparchive.getexternalattributesname.php
* @param string $name <p>
* Name of the entry.
* </p>
* @param int $opsys <p>
* On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants.
* </p>
* @param int $attr <p>
* On success, receive the external attributes. Value depends on operating system.
* </p>
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* attributes are returned.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function getExternalAttributesName(string $name, int &$opsys, int &$attr, int $flags = null): bool {}
/**
* (PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)<br/>
* Retrieve the external attributes of an entry defined by its index
* @link http://php.net/manual/en/ziparchive.getexternalattributesindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @param int $opsys <p>
* On success, receive the operating system code defined by one of the ZipArchive::OPSYS_ constants.
* </p>
* @param int $attr <p>
* On success, receive the external attributes. Value depends on operating system.
* </p>
* @param int $flags [optional] <p>
* If flags is set to <b>ZipArchive::FL_UNCHANGED</b>, the original unchanged
* attributes are returned.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function getExternalAttributesIndex(int $index, int &$opsys, int &$attr, int $flags = null): bool {}
/**
* (PHP 7, PECL zip >= 1.13.0)<br/>
* Set the compression method of an entry defined by its name
* @link http://php.net/manual/en/ziparchive.setcompressionname.php
* @param string $name <p>
* Name of the entry.
* </p>
* @param int $comp_method <p>
* The compression method. Either
* <b>ZipArchive::CM_DEFAULT</b>,
* <b>ZipArchive::CM_STORE</b> or
* <b>ZipArchive::CM_DEFLATE</b>.
* </p>
* @param int $comp_flags [optional] <p>
* Compression flags. Currently unused.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setCompressionName(string $name, int $comp_method, int $comp_flags = 0): bool {}
/**
* (PHP 7, PECL zip >= 1.13.0)<br/>
* Set the compression method of an entry defined by its index
* @link http://php.net/manual/en/ziparchive.setcompressionindex.php
* @param int $index <p>
* Index of the entry.
* </p>
* @param int $comp_method <p>
* The compression method. Either
* <b>ZipArchive::CM_DEFAULT</b>,
* <b>ZipArchive::CM_STORE</b> or
* <b>ZipArchive::CM_DEFLATE</b>.
* </p>
* @param int $comp_flags [optional] <p>
* Compression flags. Currently unused.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function setCompressionIndex(int $index, int $comp_method, int $comp_flags = 0): bool {}
}
/**
* (PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.0.0)<br/>
* Open a ZIP file archive
* @link http://php.net/manual/en/function.zip-open.php
* @param string $filename <p>
* The file name of the ZIP archive to open.
* </p>
* @return resource a resource handle for later use with
* <b>zip_read</b> and <b>zip_close</b>
* or returns the number of error if <i>filename</i> does not
* exist or in case of other error.
*/
function zip_open(string $filename) {}
/**
* (PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.0.0)<br/>
* Close a ZIP file archive
* @link http://php.net/manual/en/function.zip-close.php
* @param resource $zip <p>
* A ZIP file previously opened with <b>zip_open</b>.
* </p>
* @return void No value is returned.
*/
function zip_close($zip) {}
/**
* (PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.0.0)<br/>
* Read next entry in a ZIP file archive
* @link http://php.net/manual/en/function.zip-read.php
* @param resource $zip <p>
* A ZIP file previously opened with <b>zip_open</b>.
* </p>
* @return resource a directory entry resource for later use with the
* zip_entry_... functions, or <b>FALSE</b> if
* there are no more entries to read, or an error code if an error
* occurred.
*/
function zip_read($zip) {}
/**
* (PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.0.0)<br/>
* Open a directory entry for reading
* @link http://php.net/manual/en/function.zip-entry-open.php
* @param resource $zip <p>
* A valid resource handle returned by <b>zip_open</b>.
* </p>
* @param resource $zip_entry <p>
* A directory entry returned by <b>zip_read</b>.
* </p>
* @param string $mode [optional] <p>
* Any of the modes specified in the documentation of