CoolCMS API

ParameterHandlerRegistry
in package

FinalYes

Maps the int `$type` to its {@see AbstractParameterHandler}.

Handlers are stateless (no dependencies), so the registry can be shared statically through self::shared() (presenter traits, display, filters) or created fresh through self::createDefault() (ParameterForm, whose child may add module handlers without affecting the shared instance).

Table of Contents

Properties

$byType  : array<int, AbstractParameterHandler>
$shared  : self|null

Methods

createDefault()  : self
Creates a fresh registry with the default handler set (covers all `ParameterType` constants).
get()  : AbstractParameterHandler|null
has()  : bool
register()  : self
require()  : AbstractParameterHandler
shared()  : self
Returns the shared instance with the default handler set (lazy singleton).

Properties

Methods

createDefault()

Creates a fresh registry with the default handler set (covers all `ParameterType` constants).

public static createDefault() : self
Return values
self

shared()

Returns the shared instance with the default handler set (lazy singleton).

public static shared() : self

Use it where no ParameterForm is at hand: specification display, building filters from the URL.

Return values
self
On this page

Search results