Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LoaderChain.php

function LoaderChain::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/serializer/Mapping/Loader/LoaderChain.php \Symfony\Component\Serializer\Mapping\Loader\LoaderChain::__construct()

Parameters

LoaderInterface[] $loaders The metadata loaders to use:

Throws

MappingException If any of the loaders has an invalid type

2 calls to LoaderChain::__construct()
FilesLoader::__construct in vendor/symfony/validator/Mapping/Loader/FilesLoader.php
Creates a new loader.
FilesLoader::__construct in vendor/symfony/validator/Mapping/Loader/FilesLoader.php
Creates a new loader.
1 method overrides LoaderChain::__construct()
FilesLoader::__construct in vendor/symfony/validator/Mapping/Loader/FilesLoader.php
Creates a new loader.

File

vendor/symfony/validator/Mapping/Loader/LoaderChain.php, line 33

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_debug_type($loader)));
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal