function LoaderChain::__construct
Same name in this branch
- 11.1.x vendor/symfony/validator/Mapping/Loader/LoaderChain.php \Symfony\Component\Validator\Mapping\Loader\LoaderChain::__construct()
Accepts a list of LoaderInterface instances.
Parameters
LoaderInterface[] $loaders An array of LoaderInterface instances:
Throws
MappingException If any of the loaders does not implement LoaderInterface
File
-
vendor/
symfony/ serializer/ Mapping/ Loader/ LoaderChain.php, line 37
Class
- LoaderChain
- Calls multiple {@link LoaderInterface} instances in a chain.
Namespace
Symfony\Component\Serializer\Mapping\LoaderCode
public function __construct(array $loaders) {
foreach ($loaders as $loader) {
if (!$loader instanceof LoaderInterface) {
throw new MappingException(\sprintf('Class "%s" is expected to implement LoaderInterface.', get_debug_type($loader)));
}
}
}