FileLoader
class FileLoader implements LoaderInterface
Properties
protected Filesystem | $files | The filesystem instance. |
|
protected string | $path | The default path for the loader. |
|
protected array | $hints | All of the namespace hints. |
Methods
Load the messages for the given locale.
Load a namespaced translation group.
Load a local namespaced translation group for overrides.
Load a locale from a given path.
Load a locale from the given JSON file path.
Add a new namespace to the loader.
Get an array of all the registered namespaces.
Details
at line 37
void
__construct(Filesystem $files, string $path)
Create a new file loader instance.
at line 51
array
load(string $locale, string $group, string $namespace = null)
Load the messages for the given locale.
at line 72
protected array
loadNamespaced(string $locale, string $group, string $namespace)
Load a namespaced translation group.
at line 92
protected array
loadNamespaceOverrides(array $lines, string $locale, string $group, string $namespace)
Load a local namespaced translation group for overrides.
at line 111
protected array
loadPath(string $path, string $locale, string $group)
Load a locale from a given path.
at line 127
protected array
loadJsonPath(string $path, string $locale)
Load a locale from the given JSON file path.
at line 143
void
addNamespace(string $namespace, string $hint)
Add a new namespace to the loader.
at line 153
array
namespaces()
Get an array of all the registered namespaces.