Первый существующий файл
public static getFirstExistingFileArray ( string[] $files = [] ) : string | null | ||
$files | string[] | |
return | string | null |
/** * Путь к файлу в этом расширении * * @param $filePath * @return null|string */ public function getFilePath($filePath) { $composerFiles = []; foreach ($this->alias as $name => $path) { $composerFiles[] = $path . '/' . $filePath; } return FileHelper::getFirstExistingFileArray($composerFiles); }