Zum Inhalt springen

API reference / Quittio \ Core \ Data \ Concerns

Immutable

trait in quittio/core

Quittio\Core\Data\Concerns\Immutable · Source

Generic copy-on-write helper for readonly DTOs whose properties are all promoted constructor parameters.

Methods#

MethodDescription
->with()Returns a copy with the given properties replaced.

with()#

public function with(array<string, mixed> $changes): static

Returns a copy with the given properties replaced.

ParameterTypeDescription
$changesarray<string, mixed>
Returns
static

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.