You are here

function xautoload_InjectedAPI_findFile::suggestFile_skipFileExists in X Autoload 7.3

Same as suggestFile(), but skip the file_exists(), assuming that we already know the file exists.

This could make sense if a plugin already did the file_exists() check.

Parameters

string $file: The file that is supposed to declare the class.

Return value

bool TRUE, if the file was found - which is always.

File

lib/InjectedAPI/findFile.php, line 83

Class

xautoload_InjectedAPI_findFile
To help testability, we use an injected API instead of just a return value. The injected API can be mocked to provide a mocked file_exists(), and to monitor all suggested candidates, not just the correct return value.

Code

function suggestFile_skipFileExists($file) {
  $this->file = $file;
  return TRUE;
}