getFirstExistingFileArray() public static method

Первый существующий файл
public static getFirstExistingFileArray ( string[] $files = [] ) : string | null
$files string[]
return string | null
コード例 #1
0
ファイル: CmsExtension.php プロジェクト: Liv1020/cms
 /**
  * Путь к файлу в этом расширении
  *
  * @param $filePath
  * @return null|string
  */
 public function getFilePath($filePath)
 {
     $composerFiles = [];
     foreach ($this->alias as $name => $path) {
         $composerFiles[] = $path . '/' . $filePath;
     }
     return FileHelper::getFirstExistingFileArray($composerFiles);
 }