Signatur
get_object_vars(object $object): array
Beschreibung
Innerhalb der Klasse: alle Properties. Außerhalb: nur public.
Parameter
| Name | Typ | Default | Beschreibung |
|---|---|---|---|
| $object Pflicht | object | — | Objekt. |
Rückgabewert
Typ
array
Beschreibung
Property-Name → Wert.
Beispiele
DTO → Array
<?php
$data = get_object_vars($dto);