Documentation

RegistryInterface

Table of Contents

Methods

add()  : mixed
Adds an item to the registry.
get()  : mixed
Retrieves an item from the registry by its unique identifier.
get_all()  : array<string|int, mixed>
Returns all items currently stored in the registry.
remove()  : mixed
Removes an item from the registry.

Methods

add()

Adds an item to the registry.

public static add(mixed $module) : mixed
Parameters
$module : mixed

The item to be added to the registry. This could be an instance of a class, an array of settings, or any type that represents a module or component.

Return values
mixed

A unique identifier for the added item, which can be used for retrieval or removal.

get()

Retrieves an item from the registry by its unique identifier.

public static get(string $key) : mixed
Parameters
$key : string

The unique identifier of the item to retrieve.

Return values
mixed

The item associated with the provided identifier if found; null otherwise.

get_all()

Returns all items currently stored in the registry.

public static get_all() : array<string|int, mixed>
Return values
array<string|int, mixed>

An associative array of all items in the registry, keyed by their unique identifiers.

remove()

Removes an item from the registry.

public static remove(string $key) : mixed
Parameters
$key : string

The unique identifier of the item to be removed.


        
On this page

Search results