Yaffs site version 1.1
[yaffs-website] / vendor / symfony / finder / Tests / FakeAdapter / FailingAdapter.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\Finder\Tests\FakeAdapter;
13
14 use Symfony\Component\Finder\Adapter\AbstractAdapter;
15 use Symfony\Component\Finder\Exception\AdapterFailureException;
16
17 /**
18  * @author Jean-François Simon <contact@jfsimon.fr>
19  */
20 class FailingAdapter extends AbstractAdapter
21 {
22     /**
23      * {@inheritdoc}
24      */
25     public function searchInDirectory($dir)
26     {
27         throw new AdapterFailureException($this);
28     }
29
30     /**
31      * {@inheritdoc}
32      */
33     public function getName()
34     {
35         return 'failing';
36     }
37
38     /**
39      * {@inheritdoc}
40      */
41     protected function canBeUsed()
42     {
43         return true;
44     }
45 }