classes/Structure.md

Structure

Overview:

Structure wraps arrays or objects and allows property access ($obj->key) and array access interchangeably.

Use Structure when you want object-style access over nested arrays and mixed payloads, especially for API responses.

Public API:

Behavior:

Example:

$s = new Structure(['user' => ['name' => 'Ada']]);
echo $s->user->name;