You are here

function ClassFinderInterface::apiFindFile in X Autoload 7.4

Same name and namespace in other branches
  1. 7.5 src/ClassFinder/ClassFinderInterface.php \Drupal\xautoload\ClassFinder\ClassFinderInterface::apiFindFile()

Finds the path to the file where the class is defined.

Parameters

\Drupal\xautoload\ClassFinder\InjectedApi\InjectedApiInterface $api: API object with a suggestFile() method. We are supposed to call $api->suggestFile($file) with all suggestions we can find, until it returns TRUE. Once suggestFile() returns TRUE, we stop and return TRUE as well. The $file will be in the $api object, so we don't need to return it.

string $class: The name of the class, with all namespaces prepended. E.g. Some\Namespace\Some\Class

Return value

TRUE|NULL TRUE, if we found the file for the class. That is, if the $api->suggestFile($file) method returned TRUE one time. NULL, if we have no more suggestions.

2 methods override ClassFinderInterface::apiFindFile()
ClassFinder::apiFindFile in lib/ClassFinder/ClassFinder.php
Finds the path to the file where the class is defined.
ProxyClassFinder::apiFindFile in lib/ClassFinder/ProxyClassFinder.php
Finds the path to the file where the class is defined.

File

lib/ClassFinder/ClassFinderInterface.php, line 28

Class

ClassFinderInterface

Namespace

Drupal\xautoload\ClassFinder

Code

function apiFindFile($api, $class);