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


PHP ezcBaseFile::walkRecursive方法代碼示例

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


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

示例1: appendRecursive

function appendRecursive($archive, $sourceDir, $prefix)
{
    $context = new ArchiveContext();
    $context->archive = $archive;
    $context->prefix = $prefix;
    ezcBaseFile::walkRecursive($sourceDir, array(), array(), 'findRecursiveCallback', $context);
}
開發者ID:alex-fang,項目名稱:Archive,代碼行數:7,代碼來源:tutorial_recursive.php

示例2: findRecursive

 public static function findRecursive($sourceDir, array $includeFilters = array(), array $excludeFilters = array())
 {
     // create the context, and then start walking over the array
     $context = new ezcBaseFileFindContext();
     ezcBaseFile::walkRecursive($sourceDir, $includeFilters, $excludeFilters, array('myProgressFinder', 'findRecursiveCallback'), $context);
     // collect the statistics (which we don't do anything with in this example)
     $statistics['size'] = $context->size;
     $statistics['count'] = $context->count;
     // return the found and pattern-matched files
     sort($context->elements);
     return $context->elements;
 }
開發者ID:corcre,項目名稱:elabftw,代碼行數:12,代碼來源:tutorial_example_04.php

示例3: findRecursive

 /**
  * Uses the walker in ezcBaseFile to find files.
  * 
  * This also uses the callback to get progress information about the file search.
  *
  * @param string $sourceDir 
  * @param array $includeFilters 
  * @param array $excludeFilters
  * @param eZAutoloadGenerator $gen 
  * @return array
  */
 public static function findRecursive($sourceDir, array $includeFilters = array(), array $excludeFilters = array(), eZAutoloadGenerator $gen)
 {
     $gen->log("Scanning for PHP-files.");
     $gen->startProgressOutput(self::OUTPUT_PROGRESS_PHASE1);
     // create the context, and then start walking over the array
     $context = new ezpAutoloadFileFindContext();
     $context->generator = $gen;
     ezcBaseFile::walkRecursive($sourceDir, $includeFilters, $excludeFilters, array('eZAutoloadGenerator', 'findRecursiveCallback'), $context);
     // return the found and pattern-matched files
     sort($context->elements);
     $gen->stopProgressOutput(self::OUTPUT_PROGRESS_PHASE1);
     $gen->log("Scan complete. Found {$context->count} PHP files.");
     return $context->elements;
 }
開發者ID:runelangseid,項目名稱:ezpublish,代碼行數:25,代碼來源:ezautoloadgenerator.php


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