class Illuminate / Translation / FileLoader

FileLoader

Implements

Properties

protected

$files Filesystem

The filesystem instance.

Default: null
protected

$paths array

The default paths for the loader.

Default: null
protected

$jsonPaths array

All of the registered paths to JSON translation files.

Default: []
protected

$hints array

All of the namespace hints.

Default: []

Methods

public

__construct ( Filesystem $files , $path ) : void

Create a new file loader instance.

Parameters

public

load ( $locale , $group , $namespace ) : array

Load the messages for the given locale.

Parameters

  • $locale string
  • $group string
  • $namespace string|null
protected

loadNamespaced ( $locale , $group , $namespace ) : array

Load a namespaced translation group.

Parameters

  • $locale string
  • $group string
  • $namespace string
protected

loadNamespaceOverrides ( array $lines , $locale , $group , $namespace ) : array

Load a local namespaced translation group for overrides.

Parameters

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

loadPaths ( array $paths , $locale , $group ) : array

Load a locale from a given path.

Parameters

  • $paths array
  • $locale string
  • $group string
protected

loadJsonPaths ( $locale ) : array

Load a locale from the given JSON file path.

Parameters

  • $locale string
public

addNamespace ( $namespace , $hint ) : void

Add a new namespace to the loader.

Parameters

  • $namespace string
  • $hint string
public

namespaces ( ) : array

Get an array of all the registered namespaces.

public

addJsonPath ( $path ) : void

Add a new JSON path to the loader.

Parameters

  • $path string
public

jsonPaths ( ) : array

Get an array of all the registered paths to JSON translation files.