class PhpFileLoader extends FileLoader

PhpFileLoader loads translations from PHP files returning an array of translations.

Methods

load(mixed $resource, string $locale, string $domain = 'messages')

Loads a locale.

array
loadResource(string $resource)

No description

Details

MessageCatalogue load(mixed $resource, string $locale, string $domain = 'messages')

Loads a locale.

Parameters

mixed $resource A resource
string $locale A locale
string $domain The domain

Return Value

MessageCatalogue A MessageCatalogue instance

Exceptions

NotFoundResourceException when the resource cannot be found
InvalidResourceException when the resource cannot be loaded

protected array loadResource(string $resource)

Parameters

string $resource

Return Value

array

Exceptions

InvalidResourceException if stream content has an invalid format