abstract class FilesLoader in Plug 7
Same name in this branch
- 7 lib/Symfony/validator/Symfony/Component/Validator/Tests/Fixtures/FilesLoader.php \Symfony\Component\Validator\Tests\Fixtures\FilesLoader
- 7 lib/Symfony/validator/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php \Symfony\Component\Validator\Mapping\Loader\FilesLoader
Base loader for loading validation metadata from a list of files.
@author Bulat Shakirzyanov <mallluhuct@gmail.com> @author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Component\Validator\Mapping\Loader\LoaderChain implements LoaderInterface
- class \Symfony\Component\Validator\Mapping\Loader\FilesLoader
Expanded class hierarchy of FilesLoader
See also
1 file declares its use of FilesLoader
- FilesLoader.php in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Fixtures/ FilesLoader.php
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Mapping/ Loader/ FilesLoader.php, line 23
Namespace
Symfony\Component\Validator\Mapping\LoaderView source
abstract class FilesLoader extends LoaderChain {
/**
* Creates a new loader.
*
* @param array $paths An array of file paths
*/
public function __construct(array $paths) {
parent::__construct($this
->getFileLoaders($paths));
}
/**
* Returns an array of file loaders for the given file paths.
*
* @param array $paths An array of file paths
*
* @return LoaderInterface[] The metadata loaders
*/
protected function getFileLoaders($paths) {
$loaders = array();
foreach ($paths as $path) {
$loaders[] = $this
->getFileLoaderInstance($path);
}
return $loaders;
}
/**
* Creates a loader for the given file path.
*
* @param string $path The file path
*
* @return LoaderInterface The created loader
*/
protected abstract function getFileLoaderInstance($path);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FilesLoader:: |
abstract protected | function | Creates a loader for the given file path. | 3 |
FilesLoader:: |
protected | function | Returns an array of file loaders for the given file paths. | |
FilesLoader:: |
public | function |
Creates a new loader. Overrides LoaderChain:: |
1 |
LoaderChain:: |
protected | property | ||
LoaderChain:: |
public | function |
Loads validation metadata into a {@link ClassMetadata} instance. Overrides LoaderInterface:: |