Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:handler:posthandler

PostHandler

Layer: Handler · Source: lib/handler/PostHandler.php:18 (lines 18–62)


class PostHandler implements FrontRequestHandler

Renders a single post view.

Validates that the requested post exists in the database via the shared FrontService before rendering. Returns a 404 response when the post is not found or the service is unavailable.

Inheritance

Relation Type Meaning
implements ''FrontRequestHandler'' contract

Constants (0)

None.

Properties (1)

Visibility Type Name Default Line
private ''ThemeRendererInterface'' $renderer 25

Methods (2)

Visibility Method Summary Line
public __construct() Construct a new PostHandler. 32
public handle() Handle an incoming front-end request. 40

__construct()

public function __construct(ThemeRendererInterface $renderer)

lines 32–35 (4)

Construct a new PostHandler.

Parameter Type Default Description
$renderer ''ThemeRendererInterface'' required The theme renderer instance.

handle()

public function handle(array $params): void

lines 40–61 (22)

Documentation inherited from ''Scriptlog\Handler\FrontRequestHandler''.

Handle an incoming front-end request.

Implementations should validate the parameters, check that the requested content exists (if applicable), and render the appropriate theme template via the ThemeRendererInterface instance.

Parameter Type Default Description
$params array required Parsed route parameters (e.g. ['value' ⇒ '…']).

Returns: void — void

Imports

Alias Fully-qualified name
HandleRequest ''Scriptlog\Core\HandleRequest''
ThemeRendererInterface ''Scriptlog\Core\ThemeRendererInterface''

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

scriptlog/lib/handler/posthandler.txt · Last modified: by admin