PHP 8.4.0 RC4 available for testing

ReflectionEnum 类

(PHP 8 >= 8.1.0)

简介

ReflectionEnum 类报告有关 Enum 的信息。

类摘要

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::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 $object, callable $factory, int $options = 0): void
}

参见

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top