略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ReflectionEnum

2024-11-14

ReflectionEnum 类

(PHP 8 >= 8.1.0)

简介

ReflectionEnum 类报告了一个 Enum 的信息。

类摘要

class ReflectionEnum extends ReflectionClass implements Reflector {
/* 继承的常量 */
const integer ReflectionClass::IS_FINAL = 64;
/* 继承的属性 */
public $name;
/* 方法 */
public getCase(string $name): ReflectionEnumUnitCase
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::getConstant(string $name): mixed
public ReflectionClass::getConstants(?int $filter = null): array
public ReflectionClass::getMethods(int $filter = ?): array
public ReflectionClass::getName(): string
public ReflectionClass::getProperties(int $filter = ?): array
public ReflectionClass::getReflectionConstants(?int $filter = null): array
public ReflectionClass::getStaticPropertyValue(string $name, mixed &$def_value = ?): mixed
public ReflectionClass::hasConstant(string $name): bool
public ReflectionClass::hasMethod(string $name): bool
public ReflectionClass::hasProperty(string $name): bool
public ReflectionClass::implementsInterface(string $interface): bool
public ReflectionClass::isInstance(object $object): bool
public ReflectionClass::isSubclassOf(string $class): bool
public ReflectionClass::newInstance(mixed $args, mixed $... = ?): object
public ReflectionClass::newInstanceArgs(array $args = ?): object
public ReflectionClass::setStaticPropertyValue(string $name, string $value): void
}

参见

目录

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/class.reflectionenum.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3