BoundTrait
Declares the model's **bounds** whitelist — the numeric fields whose `{ min, max }` extent may be computed over the filtered set.
A bound is the numeric counterpart of a facet: where a facet count returns a
per-value distribution, a bound returns the two scalars that frame a field
(the lowest and highest value), typically to size a min/max range control
from the current result set. The whitelist is fail-closed — a null
$bounds makes nothing boundable, exactly like $sortable / $groupable.
Each entry is keyed by the public field name and is either:
- a bare key (a flat scalar field, e.g.
width) — its projection permission (Field::REQUIRES) is inherited from$fields, and - a
[ Facet::PROPERTY => 'offers[*].price', Field::REQUIRES => '…' ]definition for a nested measure reached through an array expansion[*], with an optional own permission subject.
The extent query is produced by BoundsQueryTrait.
Tags
Table of Contents
Constants
- BOUNDS : string = 'bounds'
- The 'bounds' parameter constant.
Properties
- $bounds : array<string|int, mixed>|null
- The bounds whitelist (`field => true | definition`), or `null` when nothing is boundable.
Methods
- initializeBounds() : static
- Initialize the 'bounds' property.
Constants
BOUNDS
The 'bounds' parameter constant.
public
string
BOUNDS
= 'bounds'
Properties
$bounds
The bounds whitelist (`field => true | definition`), or `null` when nothing is boundable.
public
array<string|int, mixed>|null
$bounds
= []
Methods
initializeBounds()
Initialize the 'bounds' property.
public
initializeBounds([array<string|int, mixed> $init = [] ]) : static
Parameters
- $init : array<string|int, mixed> = []