LoaderChain
class LoaderChain implements LoaderInterface
Loads validation metadata from multiple {@link LoaderInterface} instances.
Pass the loaders when constructing the chain. Once {@link loadClassMetadata()} is called, that method will be called on all loaders in the chain.
Methods
__construct(array $loaders) | ||
bool | loadClassMetadata(ClassMetadata $metadata) Loads validation metadata into a {@link ClassMetadata} instance. | |
LoaderInterface[] | getLoaders() |
Details
__construct(array $loaders)
Parameters
array | $loaders | The metadata loaders to use |
Exceptions
MappingException | If any of the loaders has an invalid type |
bool loadClassMetadata(ClassMetadata $metadata)
Loads validation metadata into a {@link ClassMetadata} instance.
Parameters
ClassMetadata | $metadata |
Return Value
bool | Whether the loader succeeded |
LoaderInterface[] getLoaders()
Return Value
LoaderInterface[] |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Validator/Mapping/Loader/LoaderChain.html