2021-03-06 22:05:14 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @template-covariant T as object
|
|
|
|
*
|
|
|
|
* @property-read class-string<T> $name
|
|
|
|
*/
|
|
|
|
class ReflectionClass implements Reflector {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var class-string<T>
|
|
|
|
*/
|
|
|
|
public $name;
|
|
|
|
|
|
|
|
/**
|
2022-01-16 09:47:05 +01:00
|
|
|
* @param T|class-string<T>|interface-string<T>|trait-string|enum-string<T> $argument
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
2023-08-22 13:41:47 +02:00
|
|
|
* @psalm-taint-sink callable $argument
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function __construct($argument) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return class-string<T>
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
2021-03-06 22:54:23 +01:00
|
|
|
public function getName(): string {}
|
2022-12-18 19:07:41 +01:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
|
|
|
public function isInternal(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isUserDefined(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isInstantiable(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isCloneable(): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getFileName() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getStartLine() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getEndLine() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDocComment() {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getConstructor(): ?ReflectionMethod {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function hasMethod(string $name): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @throws ReflectionException
|
|
|
|
*/
|
|
|
|
public function getMethod(string $name): ReflectionMethod {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int-mask-of<ReflectionMethod::IS_*>|null $filter
|
|
|
|
* @return list<ReflectionMethod>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getMethods(?int $filter = null): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @throws ReflectionException
|
|
|
|
*/
|
|
|
|
public function hasProperty(string $name): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
* @throws ReflectionException
|
|
|
|
*/
|
2022-12-18 19:07:41 +01:00
|
|
|
public function getProperty(string $name): ReflectionProperty {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int-mask-of<ReflectionProperty::IS_*>|null $filter
|
|
|
|
* @return list<ReflectionProperty>
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getProperties(?int $filter = null): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function hasConstant(string $name): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
* @throws ReflectionException
|
|
|
|
*/
|
|
|
|
public function getConstant(string $name) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ReflectionClassConstant|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
* @throws ReflectionException
|
|
|
|
*/
|
|
|
|
public function getReflectionConstant(string $name) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
|
|
|
|
* @return array<non-empty-string, mixed>
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getConstants(?int $filter = null): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int-mask-of<ReflectionClassConstant::IS_*>|null $filter
|
2023-01-03 18:20:08 +01:00
|
|
|
* @return list<ReflectionClassConstant>
|
2022-11-19 15:54:02 +01:00
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getReflectionConstants(?int $filter = null): array {}
|
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @return array<interface-string, self>
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getInterfaces(): array {}
|
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @return list<interface-string>
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getInterfaceNames(): array {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isInterface(): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array<trait-string, self>
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getTraits(): array {}
|
|
|
|
|
|
|
|
/**
|
2023-01-03 17:58:53 +01:00
|
|
|
* @return array<non-empty-string, non-empty-string>
|
2022-11-19 15:54:02 +01:00
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getTraitAliases(): array {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isTrait(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isAbstract(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isFinal(): bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int-mask-of<ReflectionClass::IS_*>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2023-01-03 18:15:56 +01:00
|
|
|
public function getModifiers(): int {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
2022-12-18 20:13:36 +01:00
|
|
|
/**
|
|
|
|
* @template J as object
|
|
|
|
* @param J $object
|
|
|
|
* @psalm-assert-if-true T&J $object
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2022-11-19 15:54:02 +01:00
|
|
|
public function isInstance(object $object): bool {}
|
2021-03-06 22:05:14 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed ...$args
|
|
|
|
*
|
|
|
|
* @return T
|
|
|
|
*/
|
|
|
|
public function newInstance(...$args): object {}
|
|
|
|
|
|
|
|
/**
|
2023-01-08 23:58:14 +01:00
|
|
|
* @param list<mixed> $args
|
2021-03-06 22:05:14 +01:00
|
|
|
*
|
|
|
|
* @return T
|
|
|
|
*/
|
|
|
|
public function newInstanceArgs(array $args): object {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return T
|
|
|
|
*/
|
2021-03-06 22:54:23 +01:00
|
|
|
public function newInstanceWithoutConstructor(): object {}
|
2021-03-06 22:05:14 +01:00
|
|
|
|
2022-12-18 19:31:04 +01:00
|
|
|
/**
|
|
|
|
* @psalm-pure
|
|
|
|
*
|
|
|
|
* @return ReflectionClass|false
|
|
|
|
*/
|
|
|
|
public function getParentClass() {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @template J as object
|
|
|
|
* @param self<J>|class-string<J> $class
|
|
|
|
* @psalm-assert-if-true self<T&J> $this
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function isSubclassOf($class): bool {}
|
|
|
|
|
|
|
|
/** @return array<non-empty-string, mixed> */
|
|
|
|
public function getStaticProperties(): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array<non-empty-string, mixed>
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDefaultProperties(): array {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isIterateable(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isIterable(): bool {}
|
|
|
|
|
|
|
|
/**
|
2022-12-18 20:13:36 +01:00
|
|
|
* @template J as object
|
|
|
|
* @param self<J>|interface-string<J> $interface
|
|
|
|
* @psalm-assert-if-true self<T&J> $this
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function implementsInterface($interface): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getExtension(): ?ReflectionExtension {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getExtensionName() {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function inNamespace(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getNamespaceName(): string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getShortName(): string {}
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
/**
|
2023-01-03 21:46:47 +01:00
|
|
|
* @return list<trait-string>
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function getTraitNames(): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @template TClass as object
|
|
|
|
* @param class-string<TClass>|null $name
|
2022-11-19 15:54:02 +01:00
|
|
|
* @return ($name is null ? list<ReflectionAttribute<object>> : list<ReflectionAttribute<TClass>>)
|
|
|
|
* @psalm-pure
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
abstract class ReflectionFunctionAbstract implements Reflector
|
2021-03-06 22:05:14 +01:00
|
|
|
{
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
|
|
|
public function inNamespace(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isClosure(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isDeprecated(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isInternal(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isUserDefined(): bool {}
|
|
|
|
|
|
|
|
public function getClosureThis(): ?object {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getClosureScopeClass(): ?ReflectionClass {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getClosureCalledClass(): ?ReflectionClass {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDocComment() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getStartLine() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getEndLine() {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getExtension(): ?ReflectionExtension {}
|
|
|
|
|
|
|
|
/**
|
2023-01-03 22:16:58 +01:00
|
|
|
* @return non-empty-string|false
|
2022-11-19 15:54:02 +01:00
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2023-01-03 22:16:58 +01:00
|
|
|
public function getExtensionName() {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getFileName() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getName(): string {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getNamespaceName(): string {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|0
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getNumberOfParameters(): int {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return positive-int|0
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getNumberOfRequiredParameters(): int {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return list<ReflectionParameter>
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getParameters(): array {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-assert-if-true ReflectionType $this->getReturnType()
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function hasReturnType(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getReturnType(): ?ReflectionType {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getShortName(): string {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function returnsReference(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isGenerator(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isVariadic(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isDisabled(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getClosure(): Closure {}
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @template TClass as object
|
|
|
|
* @param class-string<TClass>|null $name
|
2021-12-20 10:19:01 +01:00
|
|
|
* @return ($name is null ? array<ReflectionAttribute<object>> : array<ReflectionAttribute<TClass>>)
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
class ReflectionFunction extends ReflectionFunctionAbstract
|
|
|
|
{
|
2022-12-06 11:19:16 +01:00
|
|
|
/**
|
|
|
|
* @param callable-string|Closure $function
|
2023-08-26 22:09:27 +02:00
|
|
|
* @psalm-taint-sink callable $function
|
2022-12-06 11:19:16 +01:00
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2022-11-19 15:54:02 +01:00
|
|
|
public function __construct(callable $function) {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function __toString(): string {}
|
|
|
|
}
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
class ReflectionProperty implements Reflector
|
|
|
|
{
|
2022-07-04 11:14:34 +02:00
|
|
|
/**
|
2022-12-06 11:12:01 +01:00
|
|
|
* @var string
|
2022-07-04 11:14:34 +02:00
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var class-string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $class;
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/**
|
|
|
|
* @return non-empty-string
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getName(): string {}
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @template TClass as object
|
|
|
|
* @param class-string<TClass>|null $name
|
2021-12-20 10:19:01 +01:00
|
|
|
* @return ($name is null ? array<ReflectionAttribute<object>> : array<ReflectionAttribute<TClass>>)
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
2021-04-06 12:29:30 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 7.4
|
|
|
|
* @psalm-assert-if-true ReflectionType $this->getType()
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
2021-04-06 12:29:30 +02:00
|
|
|
*/
|
|
|
|
public function hasType() : bool {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 7.4
|
2022-11-19 15:54:02 +01:00
|
|
|
* @psalm-pure
|
2021-04-06 12:29:30 +02:00
|
|
|
*/
|
|
|
|
public function getType() : ?ReflectionType {}
|
2022-10-17 01:33:26 +02:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
|
|
|
public function isPublic(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isPrivate(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isProtected(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isStatic(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isDefault(): bool {}
|
|
|
|
|
2022-10-17 01:33:26 +02:00
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @return int-mask-of<self::IS_>
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getModifiers(): int {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getDeclaringClass(): ReflectionClass {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return non-empty-string|false
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDocComment() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2022-10-17 01:33:26 +02:00
|
|
|
public function hasDefaultValue(): bool {}
|
|
|
|
|
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @return mixed
|
|
|
|
*
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
|
|
|
public function getDefaultValue() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2022-10-17 01:33:26 +02:00
|
|
|
public function isPromoted(): bool {}
|
2022-10-17 01:46:19 +02:00
|
|
|
|
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @since 8.1
|
|
|
|
* @psalm-pure
|
|
|
|
*/
|
2022-10-17 01:46:19 +02:00
|
|
|
public function isReadOnly(): bool {}
|
2021-03-06 22:05:14 +01:00
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
class ReflectionMethod extends ReflectionFunctionAbstract
|
2021-03-06 22:05:14 +01:00
|
|
|
{
|
2022-07-04 11:14:34 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var class-string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $class;
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
|
|
|
public function isStatic(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isConstructor(): bool {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function isDestructor(): bool {}
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @return int-mask-of<ReflectionMethod::IS_*>
|
|
|
|
* @psalm-pure
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
2023-01-03 22:08:36 +01:00
|
|
|
public function getModifiers(): int {}
|
2021-12-14 20:04:33 +01:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-pure */
|
|
|
|
public function getDeclaringClass(): ReflectionClass {}
|
|
|
|
|
|
|
|
/** @psalm-pure */
|
|
|
|
public function getPrototype(): ReflectionMethod {}
|
2021-03-06 22:05:14 +01:00
|
|
|
}
|
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-immutable */
|
2022-01-06 01:55:55 +01:00
|
|
|
class ReflectionClassConstant implements Reflector
|
2021-03-06 22:05:14 +01:00
|
|
|
{
|
2022-07-04 11:14:34 +02:00
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @var non-empty-string
|
2022-07-04 11:14:34 +02:00
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var class-string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
* @since 8.1
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $isFinal;
|
|
|
|
|
2021-03-06 22:05:14 +01:00
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @template TClass as object
|
|
|
|
* @param class-string<TClass>|null $name
|
2021-12-20 10:19:01 +01:00
|
|
|
* @return ($name is null ? array<ReflectionAttribute<object>> : array<ReflectionAttribute<TClass>>)
|
2021-03-06 22:05:14 +01:00
|
|
|
*/
|
|
|
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/** @return non-empty-string */
|
|
|
|
public function getName(): string {}
|
|
|
|
|
|
|
|
/** @return int-mask-of<self::IS_*> */
|
|
|
|
public function getModifiers(): int {}
|
|
|
|
|
|
|
|
/** @return non-empty-string|false */
|
|
|
|
public function getDocComment() {}
|
2021-03-06 22:05:14 +01:00
|
|
|
}
|
2021-03-06 22:54:23 +01:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-immutable */
|
2022-01-06 01:55:55 +01:00
|
|
|
class ReflectionParameter implements Reflector {
|
2022-07-04 11:14:34 +02:00
|
|
|
/**
|
2022-11-19 15:54:02 +01:00
|
|
|
* @var non-empty-string
|
2022-07-04 11:14:34 +02:00
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $name;
|
2022-12-18 19:07:41 +01:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @return non-empty-string */
|
|
|
|
public function getName(): string {}
|
2022-07-04 11:14:34 +02:00
|
|
|
|
2021-03-06 22:54:23 +01:00
|
|
|
/**
|
|
|
|
* @psalm-assert-if-true ReflectionType $this->getType()
|
|
|
|
*/
|
|
|
|
public function hasType() : bool {}
|
|
|
|
|
|
|
|
public function getType() : ?ReflectionType {}
|
2022-02-24 01:50:05 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
* @template TClass as object
|
|
|
|
* @param class-string<TClass>|null $name
|
|
|
|
* @return ($name is null ? array<ReflectionAttribute<object>> : array<ReflectionAttribute<TClass>>)
|
|
|
|
*/
|
|
|
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
2022-10-17 01:33:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 8.0
|
|
|
|
*/
|
|
|
|
public function isPromoted(): bool {}
|
2023-01-15 19:11:10 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-assert-if-true string $this->getDefaultValueConstantName()
|
|
|
|
*/
|
|
|
|
public function isDefaultValueConstant(): bool {}
|
|
|
|
|
|
|
|
public function getDefaultValueConstantName(): ?string {}
|
2021-03-06 22:54:23 +01:00
|
|
|
}
|
2021-10-14 00:09:52 +02:00
|
|
|
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @psalm-immutable */
|
|
|
|
abstract class ReflectionType
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @psalm-immutable */
|
2021-10-14 00:09:52 +02:00
|
|
|
class ReflectionNamedType extends ReflectionType
|
|
|
|
{
|
2022-11-19 15:54:02 +01:00
|
|
|
/** @return non-empty-string */
|
2021-10-14 00:09:52 +02:00
|
|
|
public function getName(): string {}
|
|
|
|
|
2021-10-14 00:35:54 +02:00
|
|
|
/**
|
2022-06-29 18:22:46 +02:00
|
|
|
* @psalm-assert-if-false class-string|'self'|'static' $this->getName()
|
2021-10-14 00:35:54 +02:00
|
|
|
*/
|
2021-10-14 00:09:52 +02:00
|
|
|
public function isBuiltin(): bool {}
|
2022-11-19 15:54:02 +01:00
|
|
|
|
|
|
|
/** @return non-empty-string */
|
|
|
|
public function __toString(): string {}
|
2021-10-14 00:09:52 +02:00
|
|
|
}
|