Oihana PHP System

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
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Properties

$alterKey  : string
The default alter key reference.

Methods

initializeAlterKey()  : static
Initialize the 'alters' property.

Properties

Methods

initializeAlterKey()

Initialize the 'alters' property.

public initializeAlterKey([array<string|int, mixed> $init = [] ]) : static
Parameters
$init : array<string|int, mixed> = []
Return values
static

        
On this page

Search results