Skip to content
PHP Ecosystem
Explore

UserSnapshot

API reference › Debug Core › Panel › User › UserSnapshot

final readonly classPHPForge\Debug\Panel\User\UserSnapshot
ImplementsPHPForge\Debug\Storage\PanelSnapshot
Uses traitsPHPForge\Debug\Storage\ArrayPayloadSnapshot
Sourcesrc/Panel/User/UserSnapshot.php

Canonical User panel identity and RBAC snapshot.

MethodDescriptionDefined by
__construct() finalCreates a snapshot from a tagged dynamic payload.PHPForge\Debug\Storage\ArrayPayloadSnapshot
capture() staticCaptures arbitrary array values in a JSON-safe snapshot.PHPForge\Debug\Storage\ArrayPayloadSnapshot
data()Returns the captured identity and RBAC payload.UserSnapshot
fromArray() staticHydrates a dynamic payload from decoded JSON data.PHPForge\Debug\Storage\ArrayPayloadSnapshot
jsonSerialize()Returns the tagged payload for JSON serialization.PHPForge\Debug\Storage\ArrayPayloadSnapshot
payloadKey() protected staticReturns the key under which the user payload is stored.UserSnapshot
public function data(): array<array-key, mixed>

Returns the captured identity and RBAC payload.

Returns

array<array-key, mixed>: Captured identity attributes, roles, and permissions.

protected static function payloadKey(): string

Returns the key under which the user payload is stored.

Returns

string: Payload key.