Class ChainMessagesLoader

Wraps multiple message loaders calling them one after another until one of them returns a non-empty package.

Namespace: Cake\I18n
Located at I18n/ChainMessagesLoader.php

Method Detail

__constructsource public

__construct( array $loaders )

Receives a list of callable functions or objects that will be executed one after another until one of them returns a non-empty translations package

Parameters

array $loaders
List of callables to execute

__invokesource public

__invoke( )

Executes this object returning the translations package as configured in the chain.

Returns

Aura\Intl\Package
\Aura\Intl\Package

Throws

RuntimeException
if any of the loaders in the chain is not a valid callable

Properties summary

$_loaderssource

protected array

The list of callables to execute one after another for loading messages

[]

© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/class-Cake.I18n.ChainMessagesLoader.html