Represents a concrete, user- or system-initiated intent.
An Intent expresses what is wanted — not how it is executed, not whether it is allowed, and not how it is routed.
Intent = Identity + Parameters
Intents are the central language between:
All behavior is delegated to:
Static methods describe the kind of intent:
Instance data (via constructor) describes the concrete invocation:
Intents must be serializable into a primitive payload so they can be:
Strong typing is encouraged via readonly constructor properties.
final class OpenReportIntent implements IntentInterface
{
public function __construct(
public readonly string $report
) {}
public static function name(): string
{
return 'report.open';
}
public function parameters(): array
{
return ['report' => $this->report];
}
}
| Methods | ||
|---|---|---|
public
static
|
name(): string
|
# |
public
|
parameters(): array
|
# |