ActionResolver
Resolves which execute* method to call and invokes action, returning raw view token.
Single place where that selection happens, shared by top-level dispatch and slot rendering.
Synopsis
Section titled “Synopsis”class ActionResolver
| Source | Execution/ActionResolver.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
candidateMethodNames(string $requestMethod): array<int, string> | Try exact, then canonicalized (e.g. |
execute(Action $action, string $requestMethod, ServerRequestInterface $request): mixed | Execute an action selecting execute |
resolveMethodName(Action $action, string $requestMethod): ?string | The first execute*() method name this action actually implements for the given HTTP verb, or null if none match (mirrors the candidate resolution execute() itself uses, without the execute()/default-view fallbacks — callers needing that fallback should use execute()). |
candidateMethodNames()
Section titled “candidateMethodNames()”public static function candidateMethodNames(string $requestMethod): array<int, string>
Try exact, then canonicalized (e.g.
POST -> Post), then semantic mapping (GET -> Read, POST -> Write). Semantic mapping is driven by HttpMethodMapper (configurable via the routing.http_method_map setting) so every call site agrees. Default: GET/HEAD/OPTIONS/TRACE -> Read, POST -> Write, PUT/PATCH -> Update, DELETE -> Remove.
| Parameter | Type | Description |
|---|---|---|
$requestMethod | string |
Returns array``<``int``, ``string``>
execute()
Section titled “execute()”public function execute(Action $action, string $requestMethod, ServerRequestInterface $request): mixed
Execute an action selecting execute
| Parameter | Type | Description |
|---|---|---|
$action | Action | |
$requestMethod | string | e.g. GET/POST canonicalized to ucfirst form? |
$request | ServerRequestInterface |
Returns mixed — Raw view token returned by action (string|array|View::NONE).
resolveMethodName()
Section titled “resolveMethodName()”public static function resolveMethodName(Action $action, string $requestMethod): ?string
The first execute*() method name this action actually implements for the given HTTP verb, or null if none match (mirrors the candidate resolution execute() itself uses, without the execute()/default-view fallbacks — callers needing that fallback should use execute()).
| Parameter | Type | Description |
|---|---|---|
$action | Action | |
$requestMethod | string |
Returns ?``string