Source of file FilesLoader.php
Size: 1,415 Bytes - Last Modified: 2013-07-17T08:22:21+02:00
/home/theseer/Downloads/Symfony/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Mapping\Loader; /** * Creates mapping loaders for array of files. * * Abstract class, used by * * @author Bulat Shakirzyanov <mallluhuct@gmail.com> * * @see Symfony\Component\Validator\Mapping\Loader\YamlFileLoader * @see Symfony\Component\Validator\Mapping\Loader\XmlFileLoader */ abstract class FilesLoader extends LoaderChain { /** * Array of mapping files. * * @param array $paths Array of file paths */ public function __construct(array $paths) { parent::__construct($this->getFileLoaders($paths)); } /** * Array of mapping files. * * @param array $paths Array of file paths * * @return LoaderInterface[] Array of metadata loaders */ protected function getFileLoaders($paths) { $loaders = array(); foreach ($paths as $path) { $loaders[] = $this->getFileLoaderInstance($path); } return $loaders; } /** * Takes mapping file path. * * @param string $file * * @return LoaderInterface */ abstract protected function getFileLoaderInstance($file); } |