Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:handler:handlerregistry

This is an old revision of the document!


HandlerRegistry

Layer: Handler · Source: lib/handler/HandlerRegistry.php:15 (lines 15–57)


class HandlerRegistry

Registry for front-end request handlers.

Maps route keys (e.g. 'home', 'post', 'page') to their corresponding FrontRequestHandler implementations. Used by the dispatcher to look up the correct handler for each incoming request.

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 handler for a given route key. 31
public get() Retrieve a handler by route key. 42
public has() Check whether a handler is registered for the given route key. 53

register()

public function register(string $key, FrontRequestHandler $handler): void

lines 31–34 (4)

Register a handler for a given route key.

Parameter Type Default Description
$key string required The route identifier (e.g. 'home', 'post').
$handler ''FrontRequestHandler'' required The handler instance.

Returns: void — void

get()

public function get(string $key): ?FrontRequestHandler

lines 42–45 (4)

Retrieve a handler by route key.

Parameter Type Default Description
$key string required The route identifier.

Returns: ''?FrontRequestHandler'' — FrontRequestHandler|null The handler instance, or null if not registered.

has()

public function has(string $key): bool

lines 53–56 (4)

Check whether a handler is registered for the given route key.

Parameter Type Default Description
$key string required The route identifier.

Returns: bool — bool True if a handler is registered for the key.


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

scriptlog/lib/handler/handlerregistry.1790414215.txt.gz · Last modified: by admin