function MockFileFinder::create

Same name in other branches
  1. 9 core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php \Drupal\Component\Annotation\Reflection\MockFileFinder::create()
  2. 8.9.x core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php \Drupal\Component\Annotation\Reflection\MockFileFinder::create()
  3. 11.x core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php \Drupal\Component\Annotation\Reflection\MockFileFinder::create()

Creates new mock file finder objects.

6 calls to MockFileFinder::create()
AnnotatedClassDiscovery::getDefinitions in core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
Gets the definition of all plugins for this type.
AnnotatedClassDiscoveryAutomatedProviders::getDefinitions in core/modules/migrate/src/Plugin/Discovery/AnnotatedClassDiscoveryAutomatedProviders.php
Gets the definition of all plugins for this type.
AttributeDiscoveryWithAnnotations::parseClass in core/lib/Drupal/Core/Plugin/Discovery/AttributeDiscoveryWithAnnotations.php
Parses attributes from a class.
MockFileFinderTest::testFindFile in core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
@covers ::create @covers ::findFile
StaticReflectionParserTest::testAttribute in core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php
@testWith ["AttributeClass", "\\Attribute", true] ["AttributeClass", "attribute", true] ["AttributeClass", "Attribute", true] ["AttributeClass", "\\DoesNotExist",…

... See full list

File

core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php, line 34

Class

MockFileFinder
Defines a mock file finder that only returns a single filename.

Namespace

Drupal\Component\Annotation\Reflection

Code

public static function create($filename) {
    $object = new static();
    $object->filename = $filename;
    return $object;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.