ReflectionClass Sınıfı

(PHP 5, PHP 7, PHP 8)

Giriş

ReflectionClass sınıfı bir sınıf hakkında bilgi edinilmesini sağlar.

Sınıf Sözdizimi

class ReflectionClass implements Reflector {
/* Sabitler */
public const int IS_IMPLICIT_ABSTRACT;
public const int IS_FINAL;
public const int IS_READONLY;
/* Özellikler */
public string $name;
/* Yöntemler */
public __construct(object|string $objectOrClass)
public static export(mixed $bağımsız_değişken, bool $return = false): string
public getAttributes(?string $name = null, int $flags = 0): array
public getConstant(string $isim): mixed
public getConstants(?int $filter = null): array
public getEndLine(): int|false
public getMethods(?int $süzgeç = null): array
public getModifiers(): int
public getName(): string
public getProperties(?int $süzgeç = null): array
public getStaticPropertyValue(string $isim, mixed &$öntanımlı = ?): mixed
public getTraits(): array
public hasConstant(string $isim): bool
public hasMethod(string $isim): bool
public hasProperty(string $isim): bool
public inNamespace(): bool
public isAbstract(): bool
public isAnonymous(): bool
public isCloneable(): bool
public isEnum(): bool
public isFinal(): bool
public isInstance(string $nesne): bool
public isInterface(): bool
public isInternal(): bool
public isIterable(): bool
public isReadOnly(): bool
public isTrait(): bool
public newInstance(mixed $bağımsız_değişkenler): object
public newInstanceArgs(array $bağımsız_değişkenler = []): ?object
public setStaticPropertyValue(string $isim, mixed $değer): void
public __toString(): string
}

Özellikler

name

Sınıfın ismi. Salt-okunur olup, yazılmaya çalışılırsa ReflectionException istisnası oluşur.

Öntanımlı Sabitler

ReflectionClass Değiştiricileri

ReflectionClass::IS_IMPLICIT_ABSTRACT

Bazı soyut yöntemler içerdiğinden sınıfın soyut olduğunu belirtir.

ReflectionClass::IS_EXPLICIT_ABSTRACT

Sınıfın tanımından dolayı soyut olduğunu belirtir.

ReflectionClass::IS_FINAL

Sınıfın bir final sınıf olduğunu belirtir.

ReflectionClass::IS_READONLY

Sınıfın salt okunur olduğunu belirtir.

Sürüm Bilgisi

Sürüm: Açıklama
8.0.0 ReflectionClass::export() kaldırıldı.

İçindekiler