1<?php
2
3/** @generate-function-entries */
4
5class ReflectionException extends Exception
6{
7}
8
9class Reflection
10{
11    /** @return string[] */
12    public static function getModifierNames(int $modifiers) {}
13}
14
15interface Reflector extends Stringable
16{
17}
18
19abstract class ReflectionFunctionAbstract implements Reflector
20{
21    /** @implementation-alias ReflectionClass::__clone */
22    final private function __clone(): void {}
23
24    /** @return bool */
25    public function inNamespace() {}
26
27    /** @return bool */
28    public function isClosure() {}
29
30    /** @return bool */
31    public function isDeprecated() {}
32
33    /** @return bool */
34    public function isInternal() {}
35
36    /** @return bool */
37    public function isUserDefined() {}
38
39    /** @return bool */
40    public function isGenerator() {}
41
42    /** @return bool */
43    public function isVariadic() {}
44
45    /** @return object|null */
46    public function getClosureThis() {}
47
48    /** @return ReflectionClass|null */
49    public function getClosureScopeClass() {}
50
51    /** @return ReflectionClass|null */
52    public function getClosureCalledClass() {}
53
54    /** @return string|false */
55    public function getDocComment() {}
56
57    /** @return int|false */
58    public function getEndLine() {}
59
60    /** @return ReflectionExtension|null */
61    public function getExtension() {}
62
63    /** @return string|false */
64    public function getExtensionName() {}
65
66    /** @return string|false */
67    public function getFileName() {}
68
69    /** @return string */
70    public function getName() {}
71
72    /** @return string */
73    public function getNamespaceName() {}
74
75    /** @return int */
76    public function getNumberOfParameters() {}
77
78    /** @return int */
79    public function getNumberOfRequiredParameters() {}
80
81    /** @return ReflectionParameter[] */
82    public function getParameters() {}
83
84    /** @return string */
85    public function getShortName() {}
86
87    /** @return int|false */
88    public function getStartLine() {}
89
90    /** @return array */
91    public function getStaticVariables() {}
92
93    /** @return bool */
94    public function returnsReference() {}
95
96    /** @return bool */
97    public function hasReturnType() {}
98
99    /** @return ReflectionType|null */
100    public function getReturnType() {}
101
102    /** @return ReflectionAttribute[] */
103    public function getAttributes(?string $name = null, int $flags = 0): array {}
104}
105
106class ReflectionFunction extends ReflectionFunctionAbstract
107{
108    public function __construct(Closure|string $function) {}
109
110    public function __toString(): string {}
111
112    /**
113     * @return bool
114     * @deprecated ReflectionFunction can no longer be constructed for disabled functions
115     */
116    public function isDisabled() {}
117
118    /** @return mixed */
119    public function invoke(mixed ...$args) {}
120
121    /** @return mixed */
122    public function invokeArgs(array $args) {}
123
124    /** @return Closure */
125    public function getClosure() {}
126}
127
128final class ReflectionGenerator
129{
130    public function __construct(Generator $generator) {}
131
132    /** @return int */
133    public function getExecutingLine() {}
134
135    /** @return string */
136    public function getExecutingFile() {}
137
138    /** @return array */
139    public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT) {}
140
141    /** @return ReflectionFunctionAbstract */
142    public function getFunction() {}
143
144    /** @return object|null */
145    public function getThis() {}
146
147    /** @return Generator */
148    public function getExecutingGenerator() {}
149}
150
151class ReflectionMethod extends ReflectionFunctionAbstract
152{
153    public function __construct(object|string $objectOrMethod, ?string $method = null) {}
154
155    public function __toString(): string {}
156
157    /** @return bool */
158    public function isPublic() {}
159
160    /** @return bool */
161    public function isPrivate() {}
162
163    /** @return bool */
164    public function isProtected() {}
165
166    /** @return bool */
167    public function isAbstract() {}
168
169    /** @return bool */
170    public function isFinal() {}
171
172    /** @return bool */
173    public function isStatic() {}
174
175    /** @return bool */
176    public function isConstructor() {}
177
178    /** @return bool */
179    public function isDestructor() {}
180
181    /** @return Closure */
182    public function getClosure(?object $object = null) {}
183
184    /** @return int */
185    public function getModifiers() {}
186
187    /** @return mixed */
188    public function invoke(?object $object, mixed ...$args) {}
189
190    /** @return mixed */
191    public function invokeArgs(?object $object, array $args) {}
192
193    /** @return ReflectionClass */
194    public function getDeclaringClass() {}
195
196    /** @return ReflectionMethod */
197    public function getPrototype() {}
198
199    /** @return void */
200    public function setAccessible(bool $accessible) {}
201}
202
203class ReflectionClass implements Reflector
204{
205    final private function __clone(): void {}
206
207    public function __construct(object|string $objectOrClass) {}
208
209    public function __toString(): string {}
210
211    /** @return string */
212    public function getName() {}
213
214    /** @return bool */
215    public function isInternal() {}
216
217    /** @return bool */
218    public function isUserDefined() {}
219
220    /** @return bool */
221    public function isAnonymous() {}
222
223    /** @return bool */
224    public function isInstantiable() {}
225
226    /** @return bool */
227    public function isCloneable() {}
228
229    /** @return string|false */
230    public function getFileName() {}
231
232    /** @return int|false */
233    public function getStartLine() {}
234
235    /** @return int|false */
236    public function getEndLine() {}
237
238    /** @return string|false */
239    public function getDocComment() {}
240
241    /** @return ReflectionMethod|null */
242    public function getConstructor() {}
243
244    /** @return bool */
245    public function hasMethod(string $name) {}
246
247    /** @return ReflectionMethod */
248    public function getMethod(string $name) {}
249
250    /** @return ReflectionMethod[] */
251    public function getMethods(?int $filter = null) {}
252
253    /** @return bool */
254    public function hasProperty(string $name) {}
255
256    /** @return ReflectionProperty */
257    public function getProperty(string $name) {}
258
259    /** @return ReflectionProperty[] */
260    public function getProperties(?int $filter = null) {}
261
262    /** @return bool */
263    public function hasConstant(string $name) {}
264
265    /** @return array */
266    public function getConstants(?int $filter = null) {}
267
268    /** @return ReflectionClassConstant[] */
269    public function getReflectionConstants(?int $filter = null) {}
270
271    /** @return mixed */
272    public function getConstant(string $name) {}
273
274    /** @return ReflectionClassConstant|false */
275    public function getReflectionConstant(string $name) {}
276
277    /** @return ReflectionClass[] */
278    public function getInterfaces() {}
279
280    /** @return string[] */
281    public function getInterfaceNames() {}
282
283    /** @return bool */
284    public function isInterface() {}
285
286    /** @return ReflectionClass[] */
287    public function getTraits() {}
288
289    /** @return string[] */
290    public function getTraitNames() {}
291
292    /** @return string[] */
293    public function getTraitAliases() {}
294
295    /** @return bool */
296    public function isTrait() {}
297
298    /** @return bool */
299    public function isAbstract() {}
300
301    /** @return bool */
302    public function isFinal() {}
303
304    /** @return int */
305    public function getModifiers() {}
306
307    /** @return bool */
308    public function isInstance(object $object) {}
309
310    /** @return object */
311    public function newInstance(mixed ...$args) {}
312
313    /** @return object */
314    public function newInstanceWithoutConstructor() {}
315
316    /** @return object */
317    public function newInstanceArgs(array $args = []) {}
318
319    /** @return ReflectionClass|false */
320    public function getParentClass() {}
321
322    /** @return bool */
323    public function isSubclassOf(ReflectionClass|string $class) {}
324
325    /** @return array|null */
326    public function getStaticProperties() {}
327
328    /** @return mixed */
329    public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN) {}
330
331    /** @return void */
332    public function setStaticPropertyValue(string $name, mixed $value) {}
333
334    /** @return array */
335    public function getDefaultProperties() {}
336
337    /** @return bool */
338    public function isIterable() {}
339
340    /**
341     * @return bool
342     * @alias ReflectionClass::isIterable
343     */
344    public function isIterateable() {}
345
346    /** @return bool */
347    public function implementsInterface(ReflectionClass|string $interface) {}
348
349    /** @return ReflectionExtension|null */
350    public function getExtension() {}
351
352    /** @return string|false */
353    public function getExtensionName() {}
354
355    /** @return bool */
356    public function inNamespace() {}
357
358    /** @return string */
359    public function getNamespaceName() {}
360
361    /** @return string */
362    public function getShortName() {}
363
364    /** @return ReflectionAttribute[] */
365    public function getAttributes(?string $name = null, int $flags = 0): array {}
366}
367
368class ReflectionObject extends ReflectionClass
369{
370    public function __construct(object $object) {}
371}
372
373class ReflectionProperty implements Reflector
374{
375    /** @implementation-alias ReflectionClass::__clone */
376    final private function __clone(): void {}
377
378    public function __construct(object|string $class, string $property) {}
379
380    public function __toString(): string {}
381
382    /** @return string */
383    public function getName() {}
384
385    /** @return mixed */
386    public function getValue(?object $object = null) {}
387
388    /** @return void */
389    public function setValue(mixed $objectOrValue, mixed $value = UNKNOWN) {}
390
391    /** @return bool */
392    public function isInitialized(?object $object = null) {}
393
394    /** @return bool */
395    public function isPublic() {}
396
397    /** @return bool */
398    public function isPrivate() {}
399
400    /** @return bool */
401    public function isProtected() {}
402
403    /** @return bool */
404    public function isStatic() {}
405
406    /** @return bool */
407    public function isDefault() {}
408
409    public function isPromoted(): bool {}
410
411    /** @return int */
412    public function getModifiers() {}
413
414    /** @return ReflectionClass */
415    public function getDeclaringClass() {}
416
417    /** @return string|false */
418    public function getDocComment() {}
419
420    /** @return void */
421    public function setAccessible(bool $accessible) {}
422
423    /** @return ReflectionType|null */
424    public function getType() {}
425
426    /** @return bool */
427    public function hasType() {}
428
429    public function hasDefaultValue(): bool {}
430
431    /** @return mixed */
432    public function getDefaultValue() {}
433
434    /** @return ReflectionAttribute[] */
435    public function getAttributes(?string $name = null, int $flags = 0): array {}
436}
437
438class ReflectionClassConstant implements Reflector
439{
440    /** @implementation-alias ReflectionClass::__clone */
441    final private function __clone(): void {}
442
443    public function __construct(object|string $class, string $constant) {}
444
445    public function __toString(): string {}
446
447    /** @return string|false */
448    public function getName() {}
449
450    /** @return mixed */
451    public function getValue() {}
452
453    /** @return bool */
454    public function isPublic() {}
455
456    /** @return bool */
457    public function isPrivate() {}
458
459    /** @return bool */
460    public function isProtected() {}
461
462    /** @return int */
463    public function getModifiers() {}
464
465    /** @return ReflectionClass */
466    public function getDeclaringClass() {}
467
468    /** @return string|false */
469    public function getDocComment() {}
470
471    /** @return ReflectionAttribute[] */
472    public function getAttributes(?string $name = null, int $flags = 0): array {}
473}
474
475class ReflectionParameter implements Reflector
476{
477    /** @implementation-alias ReflectionClass::__clone */
478    final private function __clone(): void {}
479
480    /** @param string|array|object $function */
481    public function __construct($function, int|string $param) {}
482
483    public function __toString(): string {}
484
485    /** @return string */
486    public function getName() {}
487
488    /** @return bool */
489    public function isPassedByReference() {}
490
491    /** @return bool */
492    public function canBePassedByValue() {}
493
494    /** @return ReflectionFunctionAbstract */
495    public function getDeclaringFunction() {}
496
497    /** @return ReflectionClass|null */
498    public function getDeclaringClass() {}
499
500    /**
501     * @return ReflectionClass|null
502     * @deprecated Use ReflectionParameter::getType() instead
503     */
504    public function getClass() {}
505
506    /** @return bool */
507    public function hasType() {}
508
509    /** @return ReflectionType|null */
510    public function getType() {}
511
512    /**
513     * @return bool
514     * @deprecated Use ReflectionParameter::getType() instead
515     */
516    public function isArray() {}
517
518    /**
519     * @return bool
520     * @deprecated Use ReflectionParameter::getType() instead
521     */
522    public function isCallable() {}
523
524    /** @return bool */
525    public function allowsNull() {}
526
527    /** @return int */
528    public function getPosition() {}
529
530    /** @return bool */
531    public function isOptional() {}
532
533    /** @return bool */
534    public function isDefaultValueAvailable() {}
535
536    /** @return mixed */
537    public function getDefaultValue() {}
538
539    /** @return bool */
540    public function isDefaultValueConstant() {}
541
542    /** @return string|null */
543    public function getDefaultValueConstantName() {}
544
545    /** @return bool */
546    public function isVariadic() {}
547
548    public function isPromoted(): bool {}
549
550    /** @return ReflectionAttribute[] */
551    public function getAttributes(?string $name = null, int $flags = 0): array {}
552}
553
554abstract class ReflectionType implements Stringable
555{
556    /** @implementation-alias ReflectionClass::__clone */
557    final private function __clone(): void {}
558
559    /** @return bool */
560    public function allowsNull() {}
561
562    public function __toString(): string {}
563}
564
565class ReflectionNamedType extends ReflectionType
566{
567    /** @return string */
568    public function getName() {}
569
570    /** @return bool */
571    public function isBuiltin() {}
572}
573
574class ReflectionUnionType extends ReflectionType
575{
576    public function getTypes(): array {}
577}
578
579class ReflectionExtension implements Reflector
580{
581    /** @implementation-alias ReflectionClass::__clone */
582    final private function __clone(): void {}
583
584    public function __construct(string $name) {}
585
586    public function __toString(): string {}
587
588    /** @return string */
589    public function getName() {}
590
591    /** @return string|null */
592    public function getVersion() {}
593
594    /** @return ReflectionFunction[] */
595    public function getFunctions() {}
596
597    /** @return array */
598    public function getConstants() {}
599
600    /** @return array */
601    public function getINIEntries() {}
602
603    /** @return ReflectionClass[] */
604    public function getClasses() {}
605
606    /** @return string[] */
607    public function getClassNames() {}
608
609    /** @return array */
610    public function getDependencies() {}
611
612    /** @return void */
613    public function info() {}
614
615    /** @return bool */
616    public function isPersistent() {}
617
618    /** @return bool */
619    public function isTemporary() {}
620}
621
622class ReflectionZendExtension implements Reflector
623{
624    /** @implementation-alias ReflectionClass::__clone */
625    final private function __clone(): void {}
626
627    public function __construct(string $name) {}
628
629    public function __toString(): string {}
630
631    /** @return string */
632    public function getName() {}
633
634    /** @return string */
635    public function getVersion() {}
636
637    /** @return string */
638    public function getAuthor() {}
639
640    /** @return string */
641    public function getURL() {}
642
643    /** @return string */
644    public function getCopyright() {}
645}
646
647final class ReflectionReference
648{
649    public static function fromArrayElement(array $array, int|string $key): ?ReflectionReference {}
650
651    public function getId(): string {}
652
653    /** @implementation-alias ReflectionClass::__clone */
654    private function __clone(): void {}
655
656    private function __construct() {}
657}
658
659class ReflectionAttribute
660{
661    public function getName(): string {}
662    public function getTarget(): int {}
663    public function isRepeated(): bool {}
664    public function getArguments(): array {}
665    public function newInstance(): object {}
666
667    private function __clone(): void {}
668
669    private function __construct() {}
670}
671