3 namespace Drupal\Component\Annotation\Reflection;
5 use Doctrine\Common\Reflection\ClassFinderInterface;
8 * Defines a mock file finder that only returns a single filename.
10 * This can be used with Doctrine\Common\Reflection\StaticReflectionParser if
11 * the filename is known and inheritance is not a concern (for example, if
12 * only the class annotation is needed).
14 class MockFileFinder implements ClassFinderInterface {
17 * The only filename this finder ever returns.
26 public function findFile($class) {
27 return $this->filename;
31 * Creates new mock file finder objects.
33 static public function create($filename) {
34 $object = new static();
35 $object->filename = $filename;