當前位置: 首頁>>代碼示例>>PHP>>正文


PHP File::testReach方法代碼示例

本文整理匯總了PHP中app\File::testReach方法的典型用法代碼示例。如果您正苦於以下問題:PHP File::testReach方法的具體用法?PHP File::testReach怎麽用?PHP File::testReach使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\File的用法示例。


在下文中一共展示了File::testReach方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: handleFile

 private function handleFile($root_folder, $f)
 {
     /*
     	The "black" identifier is just an abstract reference, not a real file:
     	we skip analysis for it
     */
     if ($f == 'black') {
         return true;
     }
     /*
     	This is to manage eventual files embedded multiple times: we track only
     	one, and eventually will substitute once all occurrences in the mlt file
     	when required
     */
     $path = $this->guessPath($root_folder, $f);
     $test_count = File::where('project_id', '=', $this->project->id)->where('original_path', '=', $path)->first();
     if ($test_count != null) {
         $test_count->references = $test_count->references + 1;
         $test_count->save();
         return true;
     }
     $file = new File();
     $file->project_id = $this->project->id;
     $file->filename = basename($f);
     $file->original_path = $path;
     $file->references = 1;
     $ret = $file->testReach();
     $file->save();
     return $ret;
 }
開發者ID:OfficineDigitali,項目名稱:pasolino,代碼行數:30,代碼來源:TestJob.php


注:本文中的app\File::testReach方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。