Skip to content
PHP Ecosystem
Explore

ItemTrait

API reference › Bootstrap 6 › item › ItemTrait

traityii2\extensions\bootstrap6\item\ItemTrait
Sourcesrc/item/ItemTrait.php
Used by 8 types

Provides the operations shared by the item value objects: the copy with one property replaced, and the readers of the array configuration accepted by fromArray().

The using class declares a private constructor whose promoted parameters are its only properties, so the copy spreads them as named arguments and the constructor validates the new value.