当前位置: 首页>>代码示例>>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;未经允许,请勿转载。