Version 1
[yaffs-website] / vendor / symfony / validator / Tests / Fixtures / FilesLoader.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Validator\Tests\Fixtures;
13
14 use Symfony\Component\Validator\Mapping\Loader\FilesLoader as BaseFilesLoader;
15 use Symfony\Component\Validator\Mapping\Loader\LoaderInterface;
16
17 abstract class FilesLoader extends BaseFilesLoader
18 {
19     protected $timesCalled = 0;
20     protected $loader;
21
22     public function __construct(array $paths, LoaderInterface $loader)
23     {
24         $this->loader = $loader;
25         parent::__construct($paths);
26     }
27
28     protected function getFileLoaderInstance($file)
29     {
30         ++$this->timesCalled;
31
32         return $this->loader;
33     }
34
35     public function getTimesCalled()
36     {
37         return $this->timesCalled;
38     }
39 }