October\Rain\Translation\FileLoader

Source: ~/vendor/october/rain/src/Translation/FileLoader.php

Implements:

Protected properties

protected Illuminate\Filesystem\Filesystem $files

The filesystem instance.

protected string $path

The default path for the loader.

protected array $hints

All of the namespace hints.

Public methods

public void __construct(Illuminate\Filesystem\Filesystem $files, string $path)

Create a new file loader instance.

Parameters
  • Illuminate\Filesystem\Filesystem $files
  • string $path

public void addNamespace(string $namespace, string $hint)

Add a new namespace to the loader.

Parameters
  • string $namespace
  • string $hint

public array load(string $locale, string $group, string $namespace=NULL)

Load the messages for the given locale.

Parameters
  • string $locale
  • string $group
  • string $namespace

Protected methods

protected array loadNamespaceOverrides(array $lines, string $locale, string $group, string $namespace)

Load a local namespaced translation group for overrides.

Parameters
  • array $lines
  • string $locale
  • string $group
  • string $namespace

protected array loadNamespaced(string $locale, string $group, string $namespace)

Load a namespaced translation group.

Parameters
  • string $locale
  • string $group
  • string $namespace

protected array loadPath(string $path, string $locale, string $group)

Load a locale from a given path.

Parameters
  • string $path
  • string $locale
  • string $group