Layer: Handler · Source: lib/handler/AdminActionRegistry.php:16 (lines 16–63)
class AdminActionRegistry
Registry of admin action commands.
Maps action constants (ActionConst::EDITCOMMENT, etc.) to their corresponding command implementations. Provides a unified dispatch point that replaces switch statements in admin CRUD files.
No parent, interface or trait. This is a root type.
None.
| Visibility | Type | Name | Default | Line |
|---|---|---|---|---|
private | array | $commands | [] | 23 |
| Visibility | Method | Summary | Line |
|---|---|---|---|
| public | register() | Register a command for the given action. | 32 |
| public | has() | Check whether a command is registered for the given action. | 43 |
| public | execute() | Execute the command registered for the given action. | 56 |
public function register(string $action, AdminActionCommand $command): void
lines 32–35 (4)
Register a command for the given action.
| Parameter | Type | Default | Description |
|---|---|---|---|
$action | string | required | The action constant (e.g. ActionConst::EDITCOMMENT). |
$command | ''AdminActionCommand'' | required | The command implementation. |
Returns: void — void
public function has(string $action): bool
lines 43–46 (4)
Check whether a command is registered for the given action.
| Parameter | Type | Default | Description |
|---|---|---|---|
$action | string | required | The action constant. |
Returns: bool — bool
public function execute(string $action, array $context): void
lines 56–62 (7)
Execute the command registered for the given action.
| Parameter | Type | Default | Description |
|---|---|---|---|
$action | string | required | The action constant. |
$context | array | required | Execution context (app, id, daos, controllers). |
Returns: void — void
Throws: \RuntimeException
| Alias | Fully-qualified name |
|---|---|
ActionConst | ''Scriptlog\Core\ActionConst'' |
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.