AlterKeyTrait
Provides support for defining and initializing the default "alter key".
The alter key is used by alteration traits (e.g., AlterUrlPropertyTrait) to resolve which property or contextual key should be used when applying transformations in a model's alteration pipeline.
By default, the alter key is initialized to Schema::ID, but it can be overridden at construction time or during initialization using the ModelParam::ALTER_KEY parameter.
Tags
Table of Contents
Properties
- $alterKey : string
- The default alter key reference.
Methods
- initializeAlterKey() : static
- Initialize the 'alters' property.
Properties
$alterKey
The default alter key reference.
public
string
$alterKey
= \org\schema\constants\Schema::ID
Tags
Methods
initializeAlterKey()
Initialize the 'alters' property.
public
initializeAlterKey([array<string|int, mixed> $init = [] ]) : static
Parameters
- $init : array<string|int, mixed> = []