class PropClassifier

Maps Inertia prop wrapper instances to the stable metadata the extension renders.

Pure classification: returns normalized arrays, never touches the collector or any global request singleton (the request is passed in explicitly).

Methods

array
classifyResolved(string $path, mixed $prop, Request $request)

Classify the given resolved prop.

bool
isDeferredRequest(Request $request)

Determine if the request loads deferred props.

string|null
deferGroup(mixed $prop, bool $isDeferredDelivery)

The defer group applies to a genuinely deferred DeferProp, and to other deferrable props (e.g. ScrollProp) as before. A DeferProp reloaded outside a deferred request carries none.

bool
isDeepMerge(mixed $prop)

A prop is a deep merge when it merges nested data or upserts matched array items. ->matchOn() on its own leaves merging off, matching the page object behavior.

string|null
mergeDirection(mixed $prop)

Resolve how a merge/scroll prop combines with existing client data. Direction is read from the prop wrapper (not the page-object arrays) so it survives deep merges, which the page object records only under deepMergeProps without a direction.

PropType|null
classifyInertiaWrapper(mixed $prop, bool $isDeferredDelivery)

Classify an Inertia prop wrapper instance into a stable token the extension renders as a type pill.

array
parseDevToolsHeader(Request $request, string $key)

Parse a comma-separated request header into a list.

Details

at line 33
array classifyResolved(string $path, mixed $prop, Request $request)

Classify the given resolved prop.

Parameters

string $path
mixed $prop
Request $request

Return Value

array

at line 54
protected bool isDeferredRequest(Request $request)

Determine if the request loads deferred props.

Parameters

Request $request

Return Value

bool

at line 63
protected string|null deferGroup(mixed $prop, bool $isDeferredDelivery)

The defer group applies to a genuinely deferred DeferProp, and to other deferrable props (e.g. ScrollProp) as before. A DeferProp reloaded outside a deferred request carries none.

Parameters

mixed $prop
bool $isDeferredDelivery

Return Value

string|null

at line 81
protected bool isDeepMerge(mixed $prop)

A prop is a deep merge when it merges nested data or upserts matched array items. ->matchOn() on its own leaves merging off, matching the page object behavior.

Parameters

mixed $prop

Return Value

bool

at line 95
protected string|null mergeDirection(mixed $prop)

Resolve how a merge/scroll prop combines with existing client data. Direction is read from the prop wrapper (not the page-object arrays) so it survives deep merges, which the page object records only under deepMergeProps without a direction.

Parameters

mixed $prop

Return Value

string|null

at line 115
protected PropType|null classifyInertiaWrapper(mixed $prop, bool $isDeferredDelivery)

Classify an Inertia prop wrapper instance into a stable token the extension renders as a type pill.

Parameters

mixed $prop
bool $isDeferredDelivery

Return Value

PropType|null

at line 133
protected array parseDevToolsHeader(Request $request, string $key)

Parse a comma-separated request header into a list.

Parameters

Request $request
string $key

Return Value

array