1<?php 2 3/** @generate-class-entries */ 4 5class ReflectionException extends Exception 6{ 7} 8 9class Reflection 10{ 11 /** @tentative-return-type */ 12 public static function getModifierNames(int $modifiers): array {} 13} 14 15interface Reflector extends Stringable 16{ 17} 18 19/** @not-serializable */ 20abstract class ReflectionFunctionAbstract implements Reflector 21{ 22 public string $name; 23 24 /** @implementation-alias ReflectionClass::__clone */ 25 private function __clone(): void {} 26 27 /** @tentative-return-type */ 28 public function inNamespace(): bool {} 29 30 /** @tentative-return-type */ 31 public function isClosure(): bool {} 32 33 /** @tentative-return-type */ 34 public function isDeprecated(): bool {} 35 36 /** @tentative-return-type */ 37 public function isInternal(): bool {} 38 39 /** @tentative-return-type */ 40 public function isUserDefined(): bool {} 41 42 /** @tentative-return-type */ 43 public function isGenerator(): bool {} 44 45 /** @tentative-return-type */ 46 public function isVariadic(): bool {} 47 48 /** @tentative-return-type */ 49 public function isStatic(): bool {} 50 51 /** @tentative-return-type */ 52 public function getClosureThis(): ?object {} 53 54 /** @tentative-return-type */ 55 public function getClosureScopeClass(): ?ReflectionClass {} 56 57 /** @tentative-return-type */ 58 public function getClosureCalledClass(): ?ReflectionClass {} 59 60 public function getClosureUsedVariables(): array {} 61 62 /** @tentative-return-type */ 63 public function getDocComment(): string|false {} 64 65 /** @tentative-return-type */ 66 public function getEndLine(): int|false {} 67 68 /** @tentative-return-type */ 69 public function getExtension(): ?ReflectionExtension {} 70 71 /** @tentative-return-type */ 72 public function getExtensionName(): string|false {} 73 74 /** @tentative-return-type */ 75 public function getFileName(): string|false {} 76 77 /** @tentative-return-type */ 78 public function getName(): string {} 79 80 /** @tentative-return-type */ 81 public function getNamespaceName(): string {} 82 83 /** @tentative-return-type */ 84 public function getNumberOfParameters(): int {} 85 86 /** @tentative-return-type */ 87 public function getNumberOfRequiredParameters(): int {} 88 89 /** @tentative-return-type */ 90 public function getParameters(): array {} 91 92 /** @tentative-return-type */ 93 public function getShortName(): string {} 94 95 /** @tentative-return-type */ 96 public function getStartLine(): int|false {} 97 98 /** @tentative-return-type */ 99 public function getStaticVariables(): array {} 100 101 /** @tentative-return-type */ 102 public function returnsReference(): bool {} 103 104 /** @tentative-return-type */ 105 public function hasReturnType(): bool {} 106 107 /** @tentative-return-type */ 108 public function getReturnType(): ?ReflectionType {} 109 110 public function hasTentativeReturnType(): bool {} 111 112 public function getTentativeReturnType(): ?ReflectionType {} 113 114 public function getAttributes(?string $name = null, int $flags = 0): array {} 115} 116 117class ReflectionFunction extends ReflectionFunctionAbstract 118{ 119 /** 120 * @var int 121 * @cvalue ZEND_ACC_DEPRECATED 122 */ 123 public const IS_DEPRECATED = UNKNOWN; 124 125 public function __construct(Closure|string $function) {} 126 127 public function __toString(): string {} 128 129 public function isAnonymous(): bool {} 130 131 /** 132 * @tentative-return-type 133 * @deprecated ReflectionFunction can no longer be constructed for disabled functions 134 */ 135 public function isDisabled(): bool {} 136 137 /** @tentative-return-type */ 138 public function invoke(mixed ...$args): mixed {} 139 140 /** @tentative-return-type */ 141 public function invokeArgs(array $args): mixed {} 142 143 /** @tentative-return-type */ 144 public function getClosure(): Closure {} 145} 146 147/** @not-serializable */ 148final class ReflectionGenerator 149{ 150 public function __construct(Generator $generator) {} 151 152 /** @tentative-return-type */ 153 public function getExecutingLine(): int {} 154 155 /** @tentative-return-type */ 156 public function getExecutingFile(): string {} 157 158 /** @tentative-return-type */ 159 public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {} 160 161 /** @tentative-return-type */ 162 public function getFunction(): ReflectionFunctionAbstract {} 163 164 /** @tentative-return-type */ 165 public function getThis(): ?object {} 166 167 /** @tentative-return-type */ 168 public function getExecutingGenerator(): Generator {} 169} 170 171class ReflectionMethod extends ReflectionFunctionAbstract 172{ 173 /** 174 * @var int 175 * @cvalue ZEND_ACC_STATIC 176 */ 177 public const IS_STATIC = UNKNOWN; 178 /** 179 * @var int 180 * @cvalue ZEND_ACC_PUBLIC 181 */ 182 public const IS_PUBLIC = UNKNOWN; 183 /** 184 * @var int 185 * @cvalue ZEND_ACC_PROTECTED 186 */ 187 public const IS_PROTECTED = UNKNOWN; 188 /** 189 * @var int 190 * @cvalue ZEND_ACC_PRIVATE 191 */ 192 public const IS_PRIVATE = UNKNOWN; 193 /** 194 * @var int 195 * @cvalue ZEND_ACC_ABSTRACT 196 */ 197 public const IS_ABSTRACT = UNKNOWN; 198 /** 199 * @var int 200 * @cvalue ZEND_ACC_FINAL 201 */ 202 public const IS_FINAL = UNKNOWN; 203 204 public string $class; 205 206 public function __construct(object|string $objectOrMethod, ?string $method = null) {} 207 208 public static function createFromMethodName(string $method): static {} 209 210 public function __toString(): string {} 211 212 /** @tentative-return-type */ 213 public function isPublic(): bool {} 214 215 /** @tentative-return-type */ 216 public function isPrivate(): bool {} 217 218 /** @tentative-return-type */ 219 public function isProtected(): bool {} 220 221 /** @tentative-return-type */ 222 public function isAbstract(): bool {} 223 224 /** @tentative-return-type */ 225 public function isFinal(): bool {} 226 227 /** @tentative-return-type */ 228 public function isConstructor(): bool {} 229 230 /** @tentative-return-type */ 231 public function isDestructor(): bool {} 232 233 /** @tentative-return-type */ 234 public function getClosure(?object $object = null): Closure {} 235 236 /** @tentative-return-type */ 237 public function getModifiers(): int {} 238 239 /** @tentative-return-type */ 240 public function invoke(?object $object, mixed ...$args): mixed {} 241 242 /** @tentative-return-type */ 243 public function invokeArgs(?object $object, array $args): mixed {} 244 245 /** @tentative-return-type */ 246 public function getDeclaringClass(): ReflectionClass {} 247 248 /** @tentative-return-type */ 249 public function getPrototype(): ReflectionMethod {} 250 251 public function hasPrototype(): bool {} 252 253 /** @tentative-return-type */ 254 public function setAccessible(bool $accessible): void {} 255} 256 257/** @not-serializable */ 258class ReflectionClass implements Reflector 259{ 260 /** 261 * @var int 262 * @cvalue ZEND_ACC_IMPLICIT_ABSTRACT_CLASS 263 * @todo deprecate 264 */ 265 public const IS_IMPLICIT_ABSTRACT = UNKNOWN; 266 /** 267 * @var int 268 * @cvalue ZEND_ACC_EXPLICIT_ABSTRACT_CLASS 269 */ 270 public const IS_EXPLICIT_ABSTRACT = UNKNOWN; 271 /** 272 * @var int 273 * @cvalue ZEND_ACC_FINAL 274 */ 275 public const IS_FINAL = UNKNOWN; 276 /** 277 * @var int 278 * @cvalue ZEND_ACC_READONLY_CLASS 279 */ 280 public const IS_READONLY = UNKNOWN; 281 282 public string $name; 283 284 private function __clone(): void {} 285 286 public function __construct(object|string $objectOrClass) {} 287 288 public function __toString(): string {} 289 290 /** @tentative-return-type */ 291 public function getName(): string {} 292 293 /** @tentative-return-type */ 294 public function isInternal(): bool {} 295 296 /** @tentative-return-type */ 297 public function isUserDefined(): bool {} 298 299 /** @tentative-return-type */ 300 public function isAnonymous(): bool {} 301 302 /** @tentative-return-type */ 303 public function isInstantiable(): bool {} 304 305 /** @tentative-return-type */ 306 public function isCloneable(): bool {} 307 308 /** @tentative-return-type */ 309 public function getFileName(): string|false {} 310 311 /** @tentative-return-type */ 312 public function getStartLine(): int|false {} 313 314 /** @tentative-return-type */ 315 public function getEndLine(): int|false {} 316 317 /** @tentative-return-type */ 318 public function getDocComment(): string|false {} 319 320 /** @tentative-return-type */ 321 public function getConstructor(): ?ReflectionMethod {} 322 323 /** @tentative-return-type */ 324 public function hasMethod(string $name): bool {} 325 326 /** @tentative-return-type */ 327 public function getMethod(string $name): ReflectionMethod {} 328 329 /** @tentative-return-type */ 330 public function getMethods(?int $filter = null): array {} 331 332 /** @tentative-return-type */ 333 public function hasProperty(string $name): bool {} 334 335 /** @tentative-return-type */ 336 public function getProperty(string $name): ReflectionProperty {} 337 338 /** @tentative-return-type */ 339 public function getProperties(?int $filter = null): array {} 340 341 /** @tentative-return-type */ 342 public function hasConstant(string $name): bool {} 343 344 /** @tentative-return-type */ 345 public function getConstants(?int $filter = null): array {} 346 347 /** @tentative-return-type */ 348 public function getReflectionConstants(?int $filter = null): array {} 349 350 /** @tentative-return-type */ 351 public function getConstant(string $name): mixed {} // TODO throw exception when the constant doesn't exist 352 353 /** @tentative-return-type */ 354 public function getReflectionConstant(string $name): ReflectionClassConstant|false {} 355 356 /** @tentative-return-type */ 357 public function getInterfaces(): array {} 358 359 /** @tentative-return-type */ 360 public function getInterfaceNames(): array {} 361 362 /** @tentative-return-type */ 363 public function isInterface(): bool {} 364 365 /** @tentative-return-type */ 366 public function getTraits(): array {} 367 368 /** @tentative-return-type */ 369 public function getTraitNames(): array {} 370 371 /** @tentative-return-type */ 372 public function getTraitAliases(): array {} 373 374 /** @tentative-return-type */ 375 public function isTrait(): bool {} 376 377 public function isEnum(): bool {} 378 379 /** @tentative-return-type */ 380 public function isAbstract(): bool {} 381 382 /** @tentative-return-type */ 383 public function isFinal(): bool {} 384 385 public function isReadOnly(): bool {} 386 387 /** @tentative-return-type */ 388 public function getModifiers(): int {} 389 390 /** @tentative-return-type */ 391 public function isInstance(object $object): bool {} 392 393 /** @tentative-return-type */ 394 public function newInstance(mixed ...$args): object {} 395 396 /** @tentative-return-type */ 397 public function newInstanceWithoutConstructor(): object {} 398 399 /** @tentative-return-type */ 400 public function newInstanceArgs(array $args = []): ?object {} 401 402 /** @tentative-return-type */ 403 public function getParentClass(): ReflectionClass|false {} 404 405 /** @tentative-return-type */ 406 public function isSubclassOf(ReflectionClass|string $class): bool {} 407 408 /** @tentative-return-type */ 409 public function getStaticProperties(): array {} 410 411 /** @tentative-return-type */ 412 public function getStaticPropertyValue(string $name, mixed $default = UNKNOWN): mixed {} 413 414 /** @tentative-return-type */ 415 public function setStaticPropertyValue(string $name, mixed $value): void {} 416 417 /** @tentative-return-type */ 418 public function getDefaultProperties(): array {} 419 420 /** @tentative-return-type */ 421 public function isIterable(): bool {} 422 423 /** 424 * @tentative-return-type 425 * @alias ReflectionClass::isIterable 426 */ 427 public function isIterateable(): bool {} 428 429 /** @tentative-return-type */ 430 public function implementsInterface(ReflectionClass|string $interface): bool {} 431 432 /** @tentative-return-type */ 433 public function getExtension(): ?ReflectionExtension {} 434 435 /** @tentative-return-type */ 436 public function getExtensionName(): string|false {} 437 438 /** @tentative-return-type */ 439 public function inNamespace(): bool {} 440 441 /** @tentative-return-type */ 442 public function getNamespaceName(): string {} 443 444 /** @tentative-return-type */ 445 public function getShortName(): string {} 446 447 public function getAttributes(?string $name = null, int $flags = 0): array {} 448} 449 450class ReflectionObject extends ReflectionClass 451{ 452 public function __construct(object $object) {} 453} 454 455/** @not-serializable */ 456class ReflectionProperty implements Reflector 457{ 458 /** 459 * @var int 460 * @cvalue ZEND_ACC_STATIC 461 */ 462 public const IS_STATIC = UNKNOWN; 463 /** 464 * @var int 465 * @cvalue ZEND_ACC_READONLY 466 */ 467 public const IS_READONLY = UNKNOWN; 468 /** 469 * @var int 470 * @cvalue ZEND_ACC_PUBLIC 471 */ 472 public const IS_PUBLIC = UNKNOWN; 473 /** 474 * @var int 475 * @cvalue ZEND_ACC_PROTECTED 476 */ 477 public const IS_PROTECTED = UNKNOWN; 478 /** 479 * @var int 480 * @cvalue ZEND_ACC_PRIVATE 481 */ 482 public const IS_PRIVATE = UNKNOWN; 483 484 public string $name; 485 public string $class; 486 487 /** @implementation-alias ReflectionClass::__clone */ 488 private function __clone(): void {} 489 490 public function __construct(object|string $class, string $property) {} 491 492 public function __toString(): string {} 493 494 /** @tentative-return-type */ 495 public function getName(): string {} 496 497 /** @tentative-return-type */ 498 public function getValue(?object $object = null): mixed {} 499 500 /** @tentative-return-type */ 501 public function setValue(mixed $objectOrValue, mixed $value = UNKNOWN): void {} 502 503 /** @tentative-return-type */ 504 public function isInitialized(?object $object = null): bool {} 505 506 /** @tentative-return-type */ 507 public function isPublic(): bool {} 508 509 /** @tentative-return-type */ 510 public function isPrivate(): bool {} 511 512 /** @tentative-return-type */ 513 public function isProtected(): bool {} 514 515 /** @tentative-return-type */ 516 public function isStatic(): bool {} 517 518 public function isReadOnly(): bool {} 519 520 /** @tentative-return-type */ 521 public function isDefault(): bool {} 522 523 public function isPromoted(): bool {} 524 525 /** @tentative-return-type */ 526 public function getModifiers(): int {} 527 528 /** @tentative-return-type */ 529 public function getDeclaringClass(): ReflectionClass {} 530 531 /** @tentative-return-type */ 532 public function getDocComment(): string|false {} 533 534 /** @tentative-return-type */ 535 public function setAccessible(bool $accessible): void {} 536 537 /** @tentative-return-type */ 538 public function getType(): ?ReflectionType {} 539 540 /** @tentative-return-type */ 541 public function hasType(): bool {} 542 543 public function hasDefaultValue(): bool {} 544 545 /** @tentative-return-type */ 546 public function getDefaultValue(): mixed {} 547 548 public function getAttributes(?string $name = null, int $flags = 0): array {} 549} 550 551/** @not-serializable */ 552class ReflectionClassConstant implements Reflector 553{ 554 /** 555 * @var int 556 * @cvalue ZEND_ACC_PUBLIC 557 */ 558 public const IS_PUBLIC = UNKNOWN; 559 /** 560 * @var int 561 * @cvalue ZEND_ACC_PROTECTED 562 */ 563 public const IS_PROTECTED = UNKNOWN; 564 /** 565 * @var int 566 * @cvalue ZEND_ACC_PRIVATE 567 */ 568 public const IS_PRIVATE = UNKNOWN; 569 /** 570 * @var int 571 * @cvalue ZEND_ACC_FINAL 572 */ 573 public const IS_FINAL = UNKNOWN; 574 575 public string $name; 576 public string $class; 577 578 /** @implementation-alias ReflectionClass::__clone */ 579 private function __clone(): void {} 580 581 public function __construct(object|string $class, string $constant) {} 582 583 public function __toString(): string {} 584 585 /** @tentative-return-type */ 586 public function getName(): string {} 587 588 /** @tentative-return-type */ 589 public function getValue(): mixed {} 590 591 /** @tentative-return-type */ 592 public function isPublic(): bool {} 593 594 /** @tentative-return-type */ 595 public function isPrivate(): bool {} 596 597 /** @tentative-return-type */ 598 public function isProtected(): bool {} 599 600 public function isFinal(): bool {} 601 602 /** @tentative-return-type */ 603 public function getModifiers(): int {} 604 605 /** @tentative-return-type */ 606 public function getDeclaringClass(): ReflectionClass {} 607 608 /** @tentative-return-type */ 609 public function getDocComment(): string|false {} 610 611 public function getAttributes(?string $name = null, int $flags = 0): array {} 612 613 public function isEnumCase(): bool {} 614 615 public function hasType(): bool {} 616 617 public function getType(): ?ReflectionType {} 618} 619 620/** @not-serializable */ 621class ReflectionParameter implements Reflector 622{ 623 public string $name; 624 625 /** @implementation-alias ReflectionClass::__clone */ 626 private function __clone(): void {} 627 628 /** @param string|array|object $function */ 629 public function __construct($function, int|string $param) {} 630 631 public function __toString(): string {} 632 633 /** @tentative-return-type */ 634 public function getName(): string {} 635 636 /** @tentative-return-type */ 637 public function isPassedByReference(): bool {} 638 639 /** @tentative-return-type */ 640 public function canBePassedByValue(): bool {} 641 642 /** @tentative-return-type */ 643 public function getDeclaringFunction(): ReflectionFunctionAbstract {} 644 645 /** @tentative-return-type */ 646 public function getDeclaringClass(): ?ReflectionClass {} 647 648 /** 649 * @tentative-return-type 650 * @deprecated Use ReflectionParameter::getType() instead 651 */ 652 public function getClass(): ?ReflectionClass {} 653 654 /** @tentative-return-type */ 655 public function hasType(): bool {} 656 657 /** @tentative-return-type */ 658 public function getType(): ?ReflectionType {} 659 660 /** 661 * @tentative-return-type 662 * @deprecated Use ReflectionParameter::getType() instead 663 */ 664 public function isArray(): bool {} 665 666 /** 667 * @tentative-return-type 668 * @deprecated Use ReflectionParameter::getType() instead 669 */ 670 public function isCallable(): bool {} 671 672 /** @tentative-return-type */ 673 public function allowsNull(): bool {} 674 675 /** @tentative-return-type */ 676 public function getPosition(): int {} 677 678 /** @tentative-return-type */ 679 public function isOptional(): bool {} 680 681 /** @tentative-return-type */ 682 public function isDefaultValueAvailable(): bool {} 683 684 /** @tentative-return-type */ 685 public function getDefaultValue(): mixed {} 686 687 /** @tentative-return-type */ 688 public function isDefaultValueConstant(): bool {} 689 690 /** @tentative-return-type */ 691 public function getDefaultValueConstantName(): ?string {} 692 693 /** @tentative-return-type */ 694 public function isVariadic(): bool {} 695 696 public function isPromoted(): bool {} 697 698 public function getAttributes(?string $name = null, int $flags = 0): array {} 699} 700 701/** @not-serializable */ 702abstract class ReflectionType implements Stringable 703{ 704 /** @implementation-alias ReflectionClass::__clone */ 705 private function __clone(): void {} 706 707 /** @tentative-return-type */ 708 public function allowsNull(): bool {} 709 710 public function __toString(): string {} 711} 712 713class ReflectionNamedType extends ReflectionType 714{ 715 /** @tentative-return-type */ 716 public function getName(): string {} 717 718 /** @tentative-return-type */ 719 public function isBuiltin(): bool {} 720} 721 722class ReflectionUnionType extends ReflectionType 723{ 724 public function getTypes(): array {} 725} 726 727class ReflectionIntersectionType extends ReflectionType 728{ 729 public function getTypes(): array {} 730} 731 732/** @not-serializable */ 733class ReflectionExtension implements Reflector 734{ 735 public string $name; 736 737 /** @implementation-alias ReflectionClass::__clone */ 738 private function __clone(): void {} 739 740 public function __construct(string $name) {} 741 742 public function __toString(): string {} 743 744 /** @tentative-return-type */ 745 public function getName(): string {} 746 747 /** @tentative-return-type */ 748 public function getVersion(): ?string {} 749 750 /** @tentative-return-type */ 751 public function getFunctions(): array {} 752 753 /** @tentative-return-type */ 754 public function getConstants(): array {} 755 756 /** @tentative-return-type */ 757 public function getINIEntries(): array {} 758 759 /** @tentative-return-type */ 760 public function getClasses(): array {} 761 762 /** @tentative-return-type */ 763 public function getClassNames(): array {} 764 765 /** @tentative-return-type */ 766 public function getDependencies(): array {} 767 768 /** @tentative-return-type */ 769 public function info(): void {} 770 771 /** @tentative-return-type */ 772 public function isPersistent(): bool {} 773 774 /** @tentative-return-type */ 775 public function isTemporary(): bool {} 776} 777 778/** @not-serializable */ 779class ReflectionZendExtension implements Reflector 780{ 781 public string $name; 782 783 /** @implementation-alias ReflectionClass::__clone */ 784 private function __clone(): void {} 785 786 public function __construct(string $name) {} 787 788 public function __toString(): string {} 789 790 /** @tentative-return-type */ 791 public function getName(): string {} 792 793 /** @tentative-return-type */ 794 public function getVersion(): string {} 795 796 /** @tentative-return-type */ 797 public function getAuthor(): string {} 798 799 /** @tentative-return-type */ 800 public function getURL(): string {} 801 802 /** @tentative-return-type */ 803 public function getCopyright(): string {} 804} 805 806/** @not-serializable */ 807final class ReflectionReference 808{ 809 public static function fromArrayElement(array $array, int|string $key): ?ReflectionReference {} 810 811 public function getId(): string {} 812 813 /** @implementation-alias ReflectionClass::__clone */ 814 private function __clone(): void {} 815 816 private function __construct() {} 817} 818 819/** @not-serializable */ 820class ReflectionAttribute implements Reflector 821{ 822 /** 823 * @var int 824 * @cvalue REFLECTION_ATTRIBUTE_IS_INSTANCEOF 825 */ 826 public const IS_INSTANCEOF = UNKNOWN; 827 828 public function getName(): string {} 829 public function getTarget(): int {} 830 public function isRepeated(): bool {} 831 public function getArguments(): array {} 832 public function newInstance(): object {} 833 834 public function __toString(): string {} 835 836 private function __clone(): void {} 837 838 private function __construct() {} 839} 840 841class ReflectionEnum extends ReflectionClass 842{ 843 public function __construct(object|string $objectOrClass) {} 844 845 public function hasCase(string $name): bool {} 846 847 public function getCase(string $name): ReflectionEnumUnitCase {} 848 849 public function getCases(): array {} 850 851 public function isBacked(): bool {} 852 853 public function getBackingType(): ?ReflectionNamedType {} 854} 855 856class ReflectionEnumUnitCase extends ReflectionClassConstant 857{ 858 public function __construct(object|string $class, string $constant) {} 859 860 public function getEnum(): ReflectionEnum {} 861 862 /** 863 * @implementation-alias ReflectionClassConstant::getValue 864 * @no-verify 865 */ 866 public function getValue(): UnitEnum {} 867} 868 869class ReflectionEnumBackedCase extends ReflectionEnumUnitCase 870{ 871 public function __construct(object|string $class, string $constant) {} 872 873 public function getBackingValue(): int|string {} 874} 875 876/** @not-serializable */ 877final class ReflectionFiber 878{ 879 public function __construct(Fiber $fiber) {} 880 881 public function getFiber(): Fiber {} 882 883 public function getExecutingFile(): ?string {} 884 885 public function getExecutingLine(): ?int {} 886 887 public function getCallable(): callable {} 888 889 public function getTrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT): array {} 890} 891