當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。