You are here

public function LoaderChain::__construct in Plug 7

Parameters

LoaderInterface[] $loaders The metadata loaders to use:

Throws

MappingException If any of the loaders has an invalid type

1 call to LoaderChain::__construct()
FilesLoader::__construct in lib/Symfony/validator/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
Creates a new loader.
1 method overrides LoaderChain::__construct()
FilesLoader::__construct in lib/Symfony/validator/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
Creates a new loader.

File

lib/Symfony/validator/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php, line 38

Class

LoaderChain
Loads validation metadata from multiple {@link LoaderInterface} instances.

Namespace

Symfony\Component\Validator\Mapping\Loader

Code

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_class($loader)));
    }
  }
  $this->loaders = $loaders;
}