本文整理汇总了PHP中RecursiveFilterIterator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP RecursiveFilterIterator::__construct方法的具体用法?PHP RecursiveFilterIterator::__construct怎么用?PHP RecursiveFilterIterator::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecursiveFilterIterator
的用法示例。
在下文中一共展示了RecursiveFilterIterator::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __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();
}
示例2: __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');
}
}
示例3: __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;
}
示例4: __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);
}
}
示例5: __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);
}
示例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);
}
示例7: __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);
}
示例8: __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);
}
示例9: __construct
/**
* Creates a new AgaviRecursiveDirectoryFilterIterator.
*
* @var RecursiveDirectoryIterator the directory iterator to decorate
* @var array the list of include patterns (regular expressions)
* @var array the list of exclude patterns (literal)
* @var boolean whether to use the default exclude patterns.
*/
public function __construct(RecursiveDirectoryIterator $iterator, array $includes = array(), array $excludes = array(), $noDefaultExcludes = false)
{
parent::__construct($iterator);
if (!$noDefaultExcludes) {
$this->excludes = array_merge($excludes, self::$defaultExcludes);
} else {
$this->excludes = $excludes;
}
foreach ($includes as $pattern) {
$this->includes[] = '!' . str_replace('!', '\\!', $pattern) . '!i';
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
示例13: __construct
public function __construct( RecursiveIterator $recursiveIterator, $exclude = array() ) {
$this->exclude = $exclude;
parent::__construct( $recursiveIterator );
}
示例14: __construct
/**
* @param RecursiveIterator $iterator
* @param string $filter
*/
public function __construct(RecursiveIterator $iterator, $filter)
{
parent::__construct($iterator);
$this->setFilter($filter);
}
示例15: __construct
public function __construct(RecursiveDirectoryIterator $iterator, array $exceptions = array())
{
$this->exceptions = $exceptions;
parent::__construct($iterator);
}