-
Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathphar_object.stub.php
585 lines (455 loc) · 16.8 KB
/
phar_object.stub.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
<?php
/** @generate-class-entries */
class PharException extends Exception
{
}
class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess
{
/**
* @cvalue PHAR_ENT_COMPRESSED_BZ2
*/
const int BZ2 = UNKNOWN;
/**
* @cvalue PHAR_ENT_COMPRESSED_GZ
*/
const int GZ = UNKNOWN;
/**
* @cvalue PHAR_ENT_COMPRESSED_NONE
*/
const int NONE = UNKNOWN;
/**
* @cvalue PHAR_FORMAT_PHAR
*/
const int PHAR = UNKNOWN;
/**
* @cvalue PHAR_FORMAT_TAR
*/
const int TAR = UNKNOWN;
/**
* @cvalue PHAR_FORMAT_ZIP
*/
const int ZIP = UNKNOWN;
/**
* @cvalue PHAR_ENT_COMPRESSION_MASK
*/
const int COMPRESSED = UNKNOWN;
/**
* @cvalue PHAR_MIME_PHP
*/
const int PHP = UNKNOWN;
/**
* @cvalue PHAR_MIME_PHPS
*/
const int PHPS = UNKNOWN;
/**
* @cvalue PHAR_SIG_MD5
*/
const int MD5 = UNKNOWN;
/**
* @cvalue PHAR_SIG_OPENSSL
*/
const int OPENSSL = UNKNOWN;
/**
* @cvalue PHAR_SIG_OPENSSL_SHA256
*/
const int OPENSSL_SHA256 = UNKNOWN;
/**
* @cvalue PHAR_SIG_OPENSSL_SHA512
*/
const int OPENSSL_SHA512 = UNKNOWN;
/**
* @cvalue PHAR_SIG_SHA1
*/
const int SHA1 = UNKNOWN;
/**
* @cvalue PHAR_SIG_SHA256
*/
const int SHA256 = UNKNOWN;
/**
* @cvalue PHAR_SIG_SHA512
*/
const int SHA512 = UNKNOWN;
public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null) {}
public function __destruct() {}
/** @tentative-return-type */
public function addEmptyDir(string $directory): void {}
/** @tentative-return-type */
public function addFile(string $filename, ?string $localName = null): void {}
/** @tentative-return-type */
public function addFromString(string $localName, string $contents): void {}
/** @tentative-return-type */
public function buildFromDirectory(string $directory, string $pattern = ""): array {}
/** @tentative-return-type */
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
/** @tentative-return-type */
public function compressFiles(int $compression): void {}
/** @tentative-return-type */
public function decompressFiles(): true {}
/** @tentative-return-type */
public function compress(int $compression, ?string $extension = null): ?Phar {}
/** @tentative-return-type */
public function decompress(?string $extension = null): ?Phar {}
/** @tentative-return-type */
public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null): ?Phar {}
/** @tentative-return-type */
public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null): ?PharData {}
/** @tentative-return-type */
public function copy(string $from, string $to): true {}
/** @tentative-return-type */
public function count(int $mode = COUNT_NORMAL): int {}
/** @tentative-return-type */
public function delete(string $localName): true {}
/** @tentative-return-type */
public function delMetadata(): true {}
/** @tentative-return-type */
public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false): bool {}
/** @tentative-return-type */
public function getAlias(): ?string {}
/** @tentative-return-type */
public function getPath(): string {}
/** @tentative-return-type */
public function getMetadata(array $unserializeOptions = []): mixed {}
/** @tentative-return-type */
public function getModified(): bool {}
/** @tentative-return-type */
public function getSignature(): array|false {}
/** @tentative-return-type */
public function getStub(): string {}
/** @tentative-return-type */
public function getVersion(): string {}
/** @tentative-return-type */
public function hasMetadata(): bool {}
/** @tentative-return-type */
public function isBuffering(): bool {}
/** @tentative-return-type */
public function isCompressed(): int|false {}
/** @tentative-return-type */
public function isFileFormat(int $format): bool {}
/** @tentative-return-type */
public function isWritable(): bool {}
/**
* @param string $localName
* @tentative-return-type
*/
public function offsetExists($localName): bool {}
/**
* @param string $localName
* @tentative-return-type
*/
public function offsetGet($localName): SplFileInfo {}
/**
* @param string $localName
* @param resource|string $value
* @tentative-return-type
*/
public function offsetSet($localName, $value): void {}
/**
* @param string $localName
* @tentative-return-type
*/
public function offsetUnset($localName): void {}
/** @tentative-return-type */
public function setAlias(string $alias): true {}
/** @tentative-return-type */
public function setDefaultStub(?string $index = null, ?string $webIndex = null): true {}
/** @tentative-return-type */
public function setMetadata(mixed $metadata): void {}
/** @tentative-return-type */
public function setSignatureAlgorithm(int $algo, ?string $privateKey = null): void {}
/**
* @param resource|string $stub
* @tentative-return-type
*/
public function setStub($stub, int $length = UNKNOWN): true {}
/** @tentative-return-type */
public function startBuffering(): void {}
/** @tentative-return-type */
public function stopBuffering(): void {}
final public static function apiVersion(): string {}
final public static function canCompress(int $compression = 0): bool {}
final public static function canWrite(): bool {}
final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}
final public static function getSupportedCompression(): array {}
final public static function getSupportedSignatures(): array {}
final public static function interceptFileFuncs(): void {}
final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}
final public static function loadPhar(string $filename, ?string $alias = null): bool {}
final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}
final public static function running(bool $returnPhar = true): string {}
final public static function mount(string $pharPath, string $externalPath): void {}
final public static function mungServer(array $variables): void {}
final public static function unlinkArchive(string $filename): true {}
final public static function webPhar(
?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
array $mimeTypes = [], ?callable $rewrite = null): void {}
}
class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAccess
{
/** @implementation-alias Phar::__construct */
public function __construct(string $filename, int $flags = FilesystemIterator::SKIP_DOTS|FilesystemIterator::UNIX_PATHS, ?string $alias = null, int $format = 0) {}
/** @implementation-alias Phar::__destruct */
public function __destruct() {}
/**
* @tentative-return-type
* @implementation-alias Phar::addEmptyDir
*/
public function addEmptyDir(string $directory): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::addFile
*/
public function addFile(string $filename, ?string $localName = null): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::addFromString
*/
public function addFromString(string $localName, string $contents): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::buildFromDirectory
*/
public function buildFromDirectory(string $directory, string $pattern = ""): array {}
/**
* @tentative-return-type
* @implementation-alias Phar::buildFromIterator
*/
public function buildFromIterator(Traversable $iterator, ?string $baseDirectory = null): array {}
/**
* @tentative-return-type
* @implementation-alias Phar::compressFiles
*/
public function compressFiles(int $compression): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::decompressFiles
*/
public function decompressFiles(): true {}
/**
* @tentative-return-type
* @implementation-alias Phar::compress
*/
public function compress(int $compression, ?string $extension = null): ?PharData {}
/**
* @tentative-return-type
* @implementation-alias Phar::decompress
*/
public function decompress(?string $extension = null): ?PharData {}
/**
* @tentative-return-type
* @implementation-alias Phar::convertToExecutable
*/
public function convertToExecutable(?int $format = null, ?int $compression = null, ?string $extension = null): ?Phar {}
/**
* @tentative-return-type
* @implementation-alias Phar::convertToData
*/
public function convertToData(?int $format = null, ?int $compression = null, ?string $extension = null): ?PharData {}
/**
* @tentative-return-type
* @implementation-alias Phar::copy
*/
public function copy(string $from, string $to): true {}
/**
* @tentative-return-type
* @implementation-alias Phar::count
*/
public function count(int $mode = COUNT_NORMAL): int {}
/**
* @tentative-return-type
* @implementation-alias Phar::delete
*/
public function delete(string $localName): true {}
/**
* @tentative-return-type
* @implementation-alias Phar::delMetadata
*/
public function delMetadata(): true {}
/**
* @tentative-return-type
* @implementation-alias Phar::extractTo
*/
public function extractTo(string $directory, array|string|null $files = null, bool $overwrite = false): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::getAlias
*/
public function getAlias(): ?string {}
/**
* @tentative-return-type
* @implementation-alias Phar::getPath
*/
public function getPath(): string {}
/**
* @tentative-return-type
* @implementation-alias Phar::getMetadata
*/
public function getMetadata(array $unserializeOptions = []): mixed {}
/**
* @tentative-return-type
* @implementation-alias Phar::getModified
*/
public function getModified(): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::getSignature
*/
public function getSignature(): array|false {}
/**
* @tentative-return-type
* @implementation-alias Phar::getStub
*/
public function getStub(): string {}
/**
* @tentative-return-type
* @implementation-alias Phar::getVersion
*/
public function getVersion(): string {}
/**
* @tentative-return-type
* @implementation-alias Phar::hasMetadata
*/
public function hasMetadata(): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::isBuffering
*/
public function isBuffering(): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::isCompressed
*/
public function isCompressed(): int|false {}
/**
* @tentative-return-type
* @implementation-alias Phar::isFileFormat
*/
public function isFileFormat(int $format): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::isWritable
*/
public function isWritable(): bool {}
/**
* @param string $localName
* @tentative-return-type
* @implementation-alias Phar::offsetExists
*/
public function offsetExists($localName): bool {}
/**
* @param string $localName
* @tentative-return-type
* @implementation-alias Phar::offsetGet
*/
public function offsetGet($localName): SplFileInfo {}
/**
* @param string $localName
* @param resource|string $value
* @tentative-return-type
* @implementation-alias Phar::offsetSet
*/
public function offsetSet($localName, $value): void {}
/**
* @param string $localName
* @tentative-return-type
* @implementation-alias Phar::offsetUnset
*/
public function offsetUnset($localName): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::setAlias
*/
public function setAlias(string $alias): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::setDefaultStub
*/
public function setDefaultStub(?string $index = null, ?string $webIndex = null): bool {}
/**
* @tentative-return-type
* @implementation-alias Phar::setMetadata
*/
public function setMetadata(mixed $metadata): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::setSignatureAlgorithm
*/
public function setSignatureAlgorithm(int $algo, ?string $privateKey = null): void {}
/**
* @param resource|string $stub
* @implementation-alias Phar::setStub
*/
public function setStub($stub, int $length = UNKNOWN): true {}
/**
* @tentative-return-type
* @implementation-alias Phar::startBuffering
*/
public function startBuffering(): void {}
/**
* @tentative-return-type
* @implementation-alias Phar::stopBuffering
*/
public function stopBuffering(): void {}
/** @implementation-alias Phar::apiVersion */
final public static function apiVersion(): string {}
/** @implementation-alias Phar::canCompress */
final public static function canCompress(int $compression = 0): bool {}
/** @implementation-alias Phar::canWrite */
final public static function canWrite(): bool {}
/** @implementation-alias Phar::createDefaultStub */
final public static function createDefaultStub(?string $index = null, ?string $webIndex = null): string {}
/** @implementation-alias Phar::getSupportedCompression */
final public static function getSupportedCompression(): array {}
/** @implementation-alias Phar::getSupportedSignatures */
final public static function getSupportedSignatures(): array {}
/** @implementation-alias Phar::interceptFileFuncs */
final public static function interceptFileFuncs(): void {}
/** @implementation-alias Phar::isValidPharFilename */
final public static function isValidPharFilename(string $filename, bool $executable = true): bool {}
/** @implementation-alias Phar::loadPhar */
final public static function loadPhar(string $filename, ?string $alias = null): bool {}
/** @implementation-alias Phar::mapPhar */
final public static function mapPhar(?string $alias = null, int $offset = 0): bool {}
/** @implementation-alias Phar::running */
final public static function running(bool $returnPhar = true): string {}
/** @implementation-alias Phar::mount */
final public static function mount(string $pharPath, string $externalPath): void {}
/** @implementation-alias Phar::mungServer */
final public static function mungServer(array $variables): void {}
/** @implementation-alias Phar::unlinkArchive */
final public static function unlinkArchive(string $filename): true {}
/** @implementation-alias Phar::webPhar */
final public static function webPhar(
?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
array $mimeTypes = [], ?callable $rewrite = null): void {}
}
class PharFileInfo extends SplFileInfo
{
public function __construct(string $filename) {}
public function __destruct() {}
/** @tentative-return-type */
public function chmod(int $perms): void {}
/** @tentative-return-type */
public function compress(int $compression): true {}
/** @tentative-return-type */
public function decompress(): true {}
/** @tentative-return-type */
public function delMetadata(): true {}
/** @tentative-return-type */
public function getCompressedSize(): int {}
/** @tentative-return-type */
public function getCRC32(): int {}
/** @tentative-return-type */
public function getContent(): string {}
/** @tentative-return-type */
public function getMetadata(array $unserializeOptions = []): mixed {}
/** @tentative-return-type */
public function getPharFlags(): int {}
/** @tentative-return-type */
public function hasMetadata(): bool {}
/** @tentative-return-type */
public function isCompressed(?int $compression = null): bool {}
/** @tentative-return-type */
public function isCRCChecked(): bool {}
/** @tentative-return-type */
public function setMetadata(mixed $metadata): void {}
}