public function locateFile(string
$file, ?string
$folder = null, string
$ext = 'php'
) { $file =
$this->
ensureExt($file,
$ext);
// Clears the folder name if it is at the beginning of the filename
if (!
empty($folder) &&
strpos($file,
$folder) === 0
) { $file =
substr($file,
strlen($folder . '/'
));
} // Is not namespaced? Try the application folder.
if (strpos($file, '\\'
) === false
) { return $this->
legacyLocate($file,
$folder);
}