The ReflectionProperty class

(PHP 5, PHP 7, PHP 8)

Einführung

The ReflectionProperty class reports information about class properties.

Klassenbeschreibung

class ReflectionProperty implements Reflector {
/* Konstanten */
const int IS_STATIC = 16;
const int IS_PUBLIC = 1;
const int IS_PROTECTED = 2;
const int IS_PRIVATE = 4;
/* Eigenschaften */
public string $name;
public string $class;
/* Methoden */
public __construct(object|string $class, string $property)
private __clone(): void
public static export(mixed $class, string $name, bool $return = ?): string
public getAttributes(?string $name = null, int $flags = 0): array
public getDocComment(): string|false
public getModifiers(): int
public getName(): string
public getValue(?object $object = null): mixed
public hasDefaultValue(): bool
public hasType(): bool
public isDefault(): bool
public isInitialized(?object $object = null): bool
public isPrivate(): bool
public isPromoted(): bool
public isProtected(): bool
public isPublic(): bool
public isReadOnly(): bool
public isStatic(): bool
public setAccessible(bool $accessible): void
public setValue(object $object, mixed $value): void
public setValue(mixed $value): void
public __toString(): string
}

Eigenschaften

name

Name of the property. Read-only, throws ReflectionException in attempt to write.

class

Name of the class where the property is defined. Read-only, throws ReflectionException in attempt to write.

Vordefinierte Konstanten

ReflectionProperty Modifiers

ReflectionProperty::IS_STATIC

Indicates static properties. Prior to PHP 7.4.0, the value was 1.

ReflectionProperty::IS_PUBLIC

Indicates public properties. Prior to PHP 7.4.0, the value was 256.

ReflectionProperty::IS_PROTECTED

Indicates protected properties. Prior to PHP 7.4.0, the value was 512.

ReflectionProperty::IS_PRIVATE

Indicates private properties. Prior to PHP 7.4.0, the value was 1024.

Hinweis:

The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.

Inhaltsverzeichnis

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Neuigkeiten für PHP-Entwickler: Laravel 11 Veröffentlichung

Am 12. März 2024 wurde die lang erwartete Version 11 des Laravel-Frameworks veröffentlicht, die eine Reihe von spannenden Neuerungen und Verbesserungen für die PHP-Entwicklungsgemeinschaft mit sich bringt. ...

Mike94

Autor : Mike94
Kategorie: PHP Magazin

Technisches SEO bleibt relevant

Technisches SEO – Was ist das überhaupt? Technisches SEO bezieht sich auf die Optimierung der technischen Aspekte deiner Webseite. Das Ziel ist klar! ...

admin

Autor : admin
Kategorie: SEO & Online-Marketing

Was ist neu in der PHP 8.2.10

PHP 8.2.10 ist eine der neuesten Versionen von PHP, die eine Reihe von Verbesserungen und neuen Funktionen mit sich bringt. In diesem Artikel werden wir einige der herausragenden Neuerungen und Verbesserungen dieser Version diskutieren. ...

admin

Autor : admin
Kategorie: Software-Updates

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

PHP Java Android brauche Script

Als ich mich an reise nach tschernobyl buchen​ wandte (https://tschernobylreise.de/), war ich von der Organisation und dem Service angenehm übe ...

Geschrieben von pavloviktor am 28.03.2024 10:58:33
Forum: Projekthilfe
Seltsames Verhalten von execute() oder Fehler meinerseits

Hallo liebe Community, ich habe ein kleines Problem und vielleicht kann mir ja jemand helfen, würde ich mich sehr drüber freuen. Unten steht e ...

Geschrieben von garibaldiwz am 22.03.2024 13:03:12
Forum: SQL / Datenbanken
Google reCAPTCHA in Kontaktformular einbinden

Überprüfen Sie den E-Mail-Versand: Stellen Sie sicher, dass die E-Mail-Funktion mail() ordnungsgemäß funktioniert und dass keine Fehler beim V ...

Geschrieben von Gast am 18.03.2024 04:54:16
Forum: PHP Developer Forum
`count.php`

Hallo cober93327, und Danke fuer deine Antwort! :-) Naja, so einen "Besucherzähler" auf der Webseite anzuzeigen ist schon eher etwas, das man a ...

Geschrieben von kekse1 am 17.03.2024 15:56:38
Forum: Projekthilfe