W3cubDocs

/Symfony 4.1

FilesLoader

abstract class FilesLoader extends LoaderChain

Base loader for loading validation metadata from a list of files.

Properties

protected $loaders from LoaderChain

Methods

__construct(array $paths)

Creates a new loader.

bool loadClassMetadata(ClassMetadata $metadata)

Loads validation metadata into a {@link ClassMetadata} instance.

from LoaderChain
LoaderInterface[] getLoaders() from LoaderChain
LoaderInterface[] getFileLoaders(array $paths)

Returns an array of file loaders for the given file paths.

LoaderInterface getFileLoaderInstance(string $path)

Creates a loader for the given file path.

Details

__construct(array $paths)

Creates a new loader.

Parameters

array $paths An array of file paths

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[]

protected LoaderInterface[] getFileLoaders(array $paths)

Returns an array of file loaders for the given file paths.

Parameters

array $paths An array of file paths

Return Value

LoaderInterface[] The metadata loaders

abstract protected LoaderInterface getFileLoaderInstance(string $path)

Creates a loader for the given file path.

Parameters

string $path The file path

Return Value

LoaderInterface The created loader

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Validator/Mapping/Loader/FilesLoader.html