ChainMessagesLoader
in package
Wraps multiple message loaders calling them one after another until one of them returns a non-empty package.
Table of Contents
Properties
- $_loaders : array<string|int, callable>
- The list of callables to execute one after another for loading messages
Methods
- __construct() : mixed
- 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
- __invoke() : Package
- Executes this object returning the translations package as configured in the chain.
Properties
$_loaders
The list of callables to execute one after another for loading messages
protected
array<string|int, callable>
$_loaders
= []
Methods
__construct()
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
public
__construct(array<string|int, callable> $loaders) : mixed
Parameters
- $loaders : array<string|int, callable>
-
List of callables to execute
__invoke()
Executes this object returning the translations package as configured in the chain.
public
__invoke() : Package