Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:handler:adminactionregistry

This is an old revision of the document!


AdminActionRegistry

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.

Inheritance

No parent, interface or trait. This is a root type.

Constants (0)

None.

Properties (0)

None declared.

Methods (3)

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

register()

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

has()

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

execute()

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

Imports

Alias Fully-qualified name
ActionConst ''Scriptlog\Core\ActionConst''

This page is generated from source by 'tools/gendoc'. Edits will be overwritten.

scriptlog/lib/handler/adminactionregistry.1790414214.txt.gz · Last modified: by admin