2024 年 PHP 日本大会

ReflectionEnum 类

(PHP 8 >= 8.1.0)

简介

ReflectionEnum 类报告有关枚举的信息。

类概要

class ReflectionEnum extends ReflectionClass {
/* 继承的常量 */
/* 继承的属性 */
public string $name;
/* 方法 */
public __construct(object|string $objectOrClass)
public getCases(): array
public hasCase(string $name): bool
public isBacked(): bool
/* 继承的方法 */
public static ReflectionClass::export(mixed $argument, bool $return = false): string
public ReflectionClass::getAttributes(?string $name = null, int $flags = 0): array
public ReflectionClass::getProperties(?int $filter = null): array
public ReflectionClass::getProperty(string $name): ReflectionProperty
public ReflectionClass::getReflectionConstant(string $name): ReflectionClassConstant|false
public ReflectionClass::getReflectionConstants(?int $filter = null): array
public ReflectionClass::getShortName(): string
public ReflectionClass::getStartLine(): int|false
public ReflectionClass::getStaticProperties(): array
public ReflectionClass::getStaticPropertyValue(string $name, mixed &$def_value = ?): mixed
public ReflectionClass::getTraitAliases(): array
public ReflectionClass::getTraitNames(): array
public ReflectionClass::getTraits(): array
public ReflectionClass::hasConstant(string $name): bool
public ReflectionClass::hasMethod(string $name): bool
public ReflectionClass::hasProperty(string $name): bool
public ReflectionClass::implementsInterface(ReflectionClass|string $interface): bool
public ReflectionClass::initializeLazyObject(object $object): object
public ReflectionClass::inNamespace(): bool
public ReflectionClass::isAbstract(): bool
public ReflectionClass::isAnonymous(): bool
public ReflectionClass::isCloneable(): bool
public ReflectionClass::isEnum(): bool
public ReflectionClass::isFinal(): bool
public ReflectionClass::isInstance(object $object): bool
public ReflectionClass::isInstantiable(): bool
public ReflectionClass::isInterface(): bool
public ReflectionClass::isInternal(): bool
public ReflectionClass::isIterable(): bool
public ReflectionClass::isReadOnly(): bool
public ReflectionClass::isSubclassOf(ReflectionClass|string $class): bool
public ReflectionClass::isTrait(): bool
public ReflectionClass::isUninitializedLazyObject(object $object): bool
public ReflectionClass::isUserDefined(): bool
public ReflectionClass::markLazyObjectAsInitialized(object $object): object
public ReflectionClass::newInstance(mixed ...$args): object
public ReflectionClass::newInstanceArgs(array $args = []): ?object
public ReflectionClass::newInstanceWithoutConstructor(): object
public ReflectionClass::newLazyGhost(callable $initializer, int $options = 0): object
public ReflectionClass::newLazyProxy(callable $factory, int $options = 0): object
public ReflectionClass::resetAsLazyGhost(object $object, callable $initializer, int $options = 0): void
public ReflectionClass::resetAsLazyProxy(对象 $object, 可调用 $factory, 整数 $options = 0): void
}

参见

目录

添加注释

用户贡献注释

此页面没有用户贡献的注释。
To Top