final |
|---|
The business unit of work a handler seals — distinct from the database
transaction (owned by the dispatcher). Accumulate any number of non-terminal
messages (any severity) and touched OData paths, then seal with exactly one
terminal commit() / rollback().
$tx->error(text('messages.credit.exceeded'), '/amount'); return $tx->rollback(text('messages.partner.not_created'));
commit/rollback are the seal; the severity verbs are secondary detail. A
second seal throws {@see TransactionAlreadySealedException} — the dispatcher's
§9 guard routes that (and a $response !== $tx->response() mismatch) through
the technical-failure tier.
| Methods | ||
|---|---|---|
public
|
info(MessageText $message, ?string $target = null, ?string $helpId = null): self
|
# |
public
|
warning(MessageText $message, ?string $target = null, ?string $helpId = null): self
|
# |
public
|
error(MessageText $message, ?string $target = null, ?string $helpId = null): self
|
# |
public
|
success(MessageText $message, ?string $target = null, ?string $helpId = null): self
|
# |
public
|
touched(string $path): self
|
# |
public
|
commit(string|null $primary = null, array<string, mixed> $data = []): ActionSuccessResponse
|
# |
public
|
rollback(string|null $primary = null): ActionErrorResponse
|
# |
public
|
isSealed(): bool
|
# |
public
|
response(): ?ActionResponse
|
# |