interface BundleEntryReaderInterface implementsBundleReaderInterface

Reads individual entries of a resource file.

Methods

mixed
read(string$path,string$locale)

No description

mixed
readEntry(string$path,string$locale,array$indices,bool$fallback =true)

Reads an entry from a resource bundle.

Details

mixed read(string$path,string$locale)

Parameters

string $path
string $locale

Return Value

mixed returns an array or {@link \ArrayAccess} instance for complex data, a scalar value otherwise

mixed readEntry(string$path,string$locale,array$indices,bool$fallback =true)

Reads an entry from a resource bundle.

An entry can be selected from the resource bundle by passing the path to that entry in the bundle. For example, if the bundle is structured like this:

TopLevel
    NestedLevel
        Entry: Value

Then the value can be read by calling:

$reader->readEntry('...', 'en', ['TopLevel', 'NestedLevel', 'Entry']);

Parameters

string $path
string $locale
array $indices
bool $fallback

Return Value

mixed returns an array or {@link \ArrayAccess} instance for complex data and a scalar value for simple data

Exceptions

MissingResourceException If the indices cannot be accessed