class ArrayLoader implements LoaderInterface

Properties

protected array $messages

All of the translation messages.

Methods

array
load(string $locale, string $group, string $namespace = null)

Load the messages for the given locale.

void
addNamespace(string $namespace, string $hint)

Add a new namespace to the loader.

$this
addMessages(string $locale, string $group, array $messages, string|null $namespace = null)

Add messages to the loader.

array
namespaces()

Get an array of all the registered namespaces.

Details

at line 22
array load(string $locale, string $group, string $namespace = null)

Load the messages for the given locale.

Parameters

string $locale
string $group
string $namespace

Return Value

array

at line 40
void addNamespace(string $namespace, string $hint)

Add a new namespace to the loader.

Parameters

string $namespace
string $hint

Return Value

void

at line 54
$this addMessages(string $locale, string $group, array $messages, string|null $namespace = null)

Add messages to the loader.

Parameters

string $locale
string $group
array $messages
string|null $namespace

Return Value

$this

at line 68
array namespaces()

Get an array of all the registered namespaces.

Return Value

array