ArrayLoader
in package
implements
Loader
Interfaces, Classes and Traits
Table of Contents
- $messages : array<string|int, mixed>
- All of the translation messages.
- addJsonPath() : void
- Add a new JSON path to the loader.
- addMessages() : $this
- Add messages to the loader.
- addNamespace() : void
- Add a new namespace to the loader.
- load() : array<string|int, mixed>
- Load the messages for the given locale.
- namespaces() : array<string|int, mixed>
- Get an array of all the registered namespaces.
Properties
$messages
All of the translation messages.
protected
array<string|int, mixed>
$messages
= []
Methods
addJsonPath()
Add a new JSON path to the loader.
public
addJsonPath(string $path) : void
Parameters
- $path : string
Return values
void —addMessages()
Add messages to the loader.
public
addMessages(string $locale, string $group, array<string|int, mixed> $messages[, string|null $namespace = null ]) : $this
Parameters
- $locale : string
- $group : string
- $messages : array<string|int, mixed>
- $namespace : string|null = null
Return values
$this —addNamespace()
Add a new namespace to the loader.
public
addNamespace(string $namespace, string $hint) : void
Parameters
- $namespace : string
- $hint : string
Return values
void —load()
Load the messages for the given locale.
public
load(string $locale, string $group[, string $namespace = null ]) : array<string|int, mixed>
Parameters
- $locale : string
- $group : string
- $namespace : string = null
Return values
array<string|int, mixed> —namespaces()
Get an array of all the registered namespaces.
public
namespaces() : array<string|int, mixed>