当前位置: 首页>>代码示例>>PHP>>正文


PHP RecursiveFilterIterator类代码示例

本文整理汇总了PHP中RecursiveFilterIterator的典型用法代码示例。如果您正苦于以下问题:PHP RecursiveFilterIterator类的具体用法?PHP RecursiveFilterIterator怎么用?PHP RecursiveFilterIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RecursiveFilterIterator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Create a RecursiveFilterIterator from a RecursiveIterator
  *
  * @param RecursiveIterator $iterator
  */
 public function __construct(\RecursiveIterator $iterator)
 {
     parent::__construct($iterator);
     if (empty($this::$folder_ignores)) {
         $this::$folder_ignores = Grav::instance()['config']->get('system.pages.ignore_folders');
     }
 }
开发者ID:dweelie,项目名称:grav,代码行数:12,代码来源:RecursiveFolderFilterIterator.php

示例2: getChildren

 /**
  * {@inheritdoc}
  */
 public function getChildren()
 {
     $filter = parent::getChildren();
     // Pass the $acceptTests flag forward to child iterators.
     $filter->acceptTests($this->acceptTests);
     return $filter;
 }
开发者ID:paul-m,项目名称:drupal-merge-plugin,代码行数:10,代码来源:RecursiveExtensionFilterIterator.php

示例3: __construct

 /**
  * 
  * @param RecursiveIterator $iterator The RecursiveIterator to be filtered.
  */
 public function __construct(\RecursiveIterator $iterator)
 {
     // Call parent.
     parent::__construct($iterator);
     // Init some helper.
     $this->objSyncCtoFiles = SyncCtoFiles::getInstance();
 }
开发者ID:menatwork,项目名称:synccto,代码行数:11,代码来源:SyncCtoFilterIteratorBase.php

示例4: __construct

 /**
  * Constructs a filter.
  *
  * @param \RecursiveIterator       $iterator The iterator we are using to get file paths.
  * @param string                   $basedir  The top-level path we are filtering.
  * @param \PHP_CodeSniffer\Config  $config   The config data for the run.
  * @param \PHP_CodeSniffer\Ruleset $ruleset  The ruleset used for the run.
  *
  * @return void
  */
 public function __construct($iterator, $basedir, Config $config, Ruleset $ruleset)
 {
     parent::__construct($iterator);
     $this->basedir = $basedir;
     $this->config = $config;
     $this->ruleset = $ruleset;
 }
开发者ID:thekabal,项目名称:tki,代码行数:17,代码来源:Filter.php

示例5: __construct

 /**
  * __construct()
  *
  * @param RecursiveIterator $iterator
  * @param array $options
  */
 public function __construct(\RecursiveIterator $iterator, $options = array())
 {
     parent::__construct($iterator);
     $this->_rawOptions = $options;
     if ($options) {
         $this->setOptions($options);
     }
 }
开发者ID:rafalwrzeszcz,项目名称:zf2,代码行数:14,代码来源:ContextFilter.php

示例6: __construct

 /**
  * Exempt folders from the synchronisation (see #4522)
  *
  * @param \RecursiveIterator $iterator The iterator object
  */
 public function __construct(\RecursiveIterator $iterator)
 {
     if (\Config::get('fileSyncExclude') != '') {
         $this->arrExempt = array_map(function ($e) {
             return \Config::get('uploadPath') . '/' . $e;
         }, trimsplit(',', \Config::get('fileSyncExclude')));
     }
     parent::__construct($iterator);
 }
开发者ID:iCodr8,项目名称:core,代码行数:14,代码来源:Filter.php

示例7: __construct

 public function __construct(\RecursiveIterator $iterator)
 {
     parent::__construct($iterator);
     $appFolders = \OC::$APPSROOTS;
     foreach ($appFolders as $key => $appFolder) {
         $appFolders[$key] = rtrim($appFolder['path'], '/');
     }
     $this->excludedFolders = array_merge([rtrim(\OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'), '/'), rtrim(\OC::$SERVERROOT . '/themes', '/'), rtrim(\OC::$SERVERROOT . '/config', '/')], $appFolders);
 }
开发者ID:Juraganet,项目名称:core,代码行数:9,代码来源:excludefoldersbypathfilteriterator.php

示例8: __construct

 public function __construct(\RecursiveIterator $iterator, $root = '')
 {
     parent::__construct($iterator);
     $appFolders = \OC::$APPSROOTS;
     foreach ($appFolders as $key => $appFolder) {
         $appFolders[$key] = rtrim($appFolder['path'], '/');
     }
     $this->excludedFolders = array_merge([rtrim($root . '/data', '/'), rtrim($root . '/themes', '/'), rtrim($root . '/config', '/'), rtrim($root . '/apps', '/')], $appFolders);
 }
开发者ID:farukuzun,项目名称:core-1,代码行数:9,代码来源:excludefoldersbypathfilteriterator.php

示例9: __construct

 /**
  * constructor
  *
  * @param RecursiveIterator $iterator
  * @param string $filter
  */
 public function __construct(\RecursiveIterator $iterator, $filter, $topDirectory = null)
 {
     $this->_filter = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $filter);
     if ($topDirectory == null) {
         $iterator->rewind();
         $this->_topDirectory = (string) $iterator->current()->getPath();
     } else {
         $this->_topDirectory = $topDirectory;
     }
     parent::__construct($iterator);
 }
开发者ID:ralphschindler,项目名称:PHPTools,代码行数:17,代码来源:RecursiveFilterIterator.php

示例10: __construct

 /**
  * @param RecursiveIterator           $iterator
  * @param array                       $groups
  * @param PHPUnit_Framework_TestSuite $suite
  */
 public function __construct(RecursiveIterator $iterator, array $groups, PHPUnit_Framework_TestSuite $suite)
 {
     parent::__construct($iterator);
     foreach ($suite->getGroupDetails() as $group => $tests) {
         if (in_array($group, $groups)) {
             $testHashes = array_map(function ($test) {
                 return spl_object_hash($test);
             }, $tests);
             $this->groupTests = array_merge($this->groupTests, $testHashes);
         }
     }
 }
开发者ID:jamilalidrus,项目名称:Jamil,代码行数:17,代码来源:Group.php

示例11: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(RecursiveIterator $iterator)
 {
     if ($iterator instanceof \RecursiveDirectoryIterator) {
         $iteratorFlags = $iterator->getFlags();
         if ($iteratorFlags & \RecursiveDirectoryIterator::CURRENT_AS_PATHNAME || $iteratorFlags & \RecursiveDirectoryIterator::CURRENT_AS_SELF) {
             throw new \InvalidArgumentException('This iterator requires \\RecursiveDirectoryIterator with CURRENT_AS_FILEINFO flag set');
         }
         if ($iteratorFlags & \RecursiveDirectoryIterator::KEY_AS_FILENAME) {
             throw new \InvalidArgumentException('This iterator requires \\RecursiveDirectoryIterator with KEY_AS_PATHNAME flag set');
         }
     }
     parent::__construct($iterator);
 }
开发者ID:lzpfmh,项目名称:php7cc,代码行数:16,代码来源:AbstractRecursiveFilterIterator.php

示例12: __construct

 public function __construct(\RecursiveIterator $iterator, $root = '')
 {
     parent::__construct($iterator);
     $appFolders = \OC::$APPSROOTS;
     foreach ($appFolders as $key => $appFolder) {
         $appFolders[$key] = rtrim($appFolder['path'], '/');
     }
     $excludedFolders = [rtrim($root . '/data', '/'), rtrim($root . '/themes', '/'), rtrim($root . '/config', '/'), rtrim($root . '/apps', '/'), rtrim($root . '/assets', '/'), rtrim($root . '/lost+found', '/')];
     $customDataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', '');
     if ($customDataDir !== '') {
         $excludedFolders[] = rtrim($customDataDir, '/');
     }
     $this->excludedFolders = array_merge($excludedFolders, $appFolders);
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:14,代码来源:ExcludeFoldersByPathFilterIterator.php

示例13: __construct

	public function __construct( RecursiveIterator $recursiveIterator, $exclude = array() ) {
		$this->exclude = $exclude;
		parent::__construct( $recursiveIterator );
	}
开发者ID:universitytimes,项目名称:site,代码行数:4,代码来源:class-ai1wm-recursive-exclude-filter.php

示例14: __construct

 /**
  * @param RecursiveIterator $iterator
  * @param string            $filter
  */
 public function __construct(RecursiveIterator $iterator, $filter)
 {
     parent::__construct($iterator);
     $this->setFilter($filter);
 }
开发者ID:mrbadao,项目名称:api-official,代码行数:9,代码来源:Test.php

示例15: __construct

 public function __construct(\RecursiveIterator $iterator, \Closure $func)
 {
     parent::__construct($iterator);
     $this->func = $func;
 }
开发者ID:rybakit,项目名称:RybakitNavigationBundle,代码行数:5,代码来源:RecursiveCustomFilterIterator.php


注:本文中的RecursiveFilterIterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。