Reflection ReflectionEnum 클래스
(PHP 8 >= 8.1.0)
소개
ReflectionEnum 클래스는 Enum에 대한 정보를 보고합니다.
클래스 개요
class ReflectionEnum extends ReflectionClass {
/* Inherited constants */
const int ReflectionClass::IS_IMPLICIT_ABSTRACT = 16;
const int ReflectionClass::IS_EXPLICIT_ABSTRACT = 32;
const int ReflectionClass::IS_FINAL = 64;
/* Inherited properties */
public string $name;
/* Methods */
public __construct(object|string $objectOrClass)
public getBackingType(): ?ReflectionType
public getCase(string $name): ReflectionEnumUnitCase
public getCases(): array
public hasCase(string $name): bool
public isBacked(): bool
/* Inherited methods */
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::getConstructor(): ?ReflectionMethod
public ReflectionClass::getDefaultProperties(): array
public ReflectionClass::getDocComment(): string|false
public ReflectionClass::getEndLine(): int|false
public ReflectionClass::getExtension(): ?ReflectionExtension
public ReflectionClass::getExtensionName(): string|false
public ReflectionClass::getFileName(): string|false
public ReflectionClass::getInterfaceNames(): array
public ReflectionClass::getInterfaces(): array
public ReflectionClass::getMethod(string $name): ReflectionMethod
public ReflectionClass::getMethods(?int $filter = null): array
public ReflectionClass::getModifiers(): int
public ReflectionClass::getName(): string
public ReflectionClass::getNamespaceName(): string
public ReflectionClass::getParentClass(): ReflectionClass|false
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::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::isSubclassOf(ReflectionClass|string $class): bool
public ReflectionClass::isTrait(): bool
public ReflectionClass::isUserDefined(): bool
public ReflectionClass::newInstance(mixed ...$args): object
public ReflectionClass::newInstanceArgs(array $args = []): ?object
public ReflectionClass::newInstanceWithoutConstructor(): object
public ReflectionClass::setStaticPropertyValue(string $name, mixed $value): void
public ReflectionClass::__toString(): string
}
기타
목차
- ReflectionEnum::__construct — ReflectionEnum 개체를 인스턴스화합니다.
- ReflectionEnum::getBackingType — Enum의 지원 유형을 가져옵니다(있는 경우).
- ReflectionEnum::getCase — Enum의 특정 사례를 반환합니다.
- ReflectionEnum::getCases — Enum의 모든 케이스 목록을 반환합니다.
- ReflectionEnum::hasCase — Enum에서 사례 확인
- ReflectionEnum::isBacked — Enum이 지원되는 Enum인지 확인합니다.