class TranslationLoaderRepository implements TranslationLoaderRepositoryInterface (View source)

Basic implementation of the TranslationLoaderRepositoryInterface.

Stores the translation loaders in a local array.

Properties

protected $loaders

Methods

registerTranslationLoader(string $handle, TranslationLoaderInterface $loader)

Registers the translation loader for the specified handle.

getTranslationLoader(string $handle)

Gets the translation loader for the specified handle.

bool
hasTranslationLoader(string $handle)

Determines whether a translation loader with the specified handle has been registered.

removeTranslationLoader(string $handle)

Removes the translation loader with the specified handle.

array
getTranslationLoaders()

Gets all registered translation providers.

Details

TranslationLoaderInterface registerTranslationLoader(string $handle, TranslationLoaderInterface $loader)

Registers the translation loader for the specified handle.

Parameters

string $handle
TranslationLoaderInterface $loader

Return Value

TranslationLoaderInterface

TranslationLoaderInterface getTranslationLoader(string $handle)

Gets the translation loader for the specified handle.

Parameters

string $handle

Return Value

TranslationLoaderInterface

bool hasTranslationLoader(string $handle)

Determines whether a translation loader with the specified handle has been registered.

Parameters

string $handle

Return Value

bool

removeTranslationLoader(string $handle)

Removes the translation loader with the specified handle.

Parameters

string $handle

array getTranslationLoaders()

Gets all registered translation providers.

Return Value

array