protected parseToArray ( mixed $object ) : array | ||
$object | mixed | The object that will be transformed into an array. |
Résultat | array |
protected function parseToArray($object) : array
{
if (!is_array($object)) {
$attributes = method_exists($object, 'getAttributes') ? $object->getAttributes() : get_object_vars($object);
return $attributes;
}
return $object;
}