$90 GRAYBYTE WORDPRESS FILE MANAGER $71

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php55/usr/share/pear/Symfony/Component/Finder/Iterator/

HOME
Current File : /opt/alt/php55/usr/share/pear/Symfony/Component/Finder/Iterator//PathFilterIterator.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Finder\Iterator;

/**
 * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
 *
 * @author Fabien Potencier  <[email protected]>
 * @author Włodzimierz Gajda <[email protected]>
 */
class PathFilterIterator extends MultiplePcreFilterIterator
{

    /**
     * Filters the iterator values.
     *
     * @return Boolean true if the value should be kept, false otherwise
     */
    public function accept()
    {
        $filename = $this->current()->getRelativePathname();

        if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
            $filename = strtr($filename, '\\', '/');
        }

        // should at least not match one rule to exclude
        foreach ($this->noMatchRegexps as $regex) {
            if (preg_match($regex, $filename)) {
                return false;
            }
        }

        // should at least match one rule
        $match = true;
        if ($this->matchRegexps) {
            $match = false;
            foreach ($this->matchRegexps as $regex) {
                if (preg_match($regex, $filename)) {
                    return true;
                }
            }
        }

        return $match;
    }

    /**
     * Converts strings to regexp.
     *
     * PCRE patterns are left unchanged.
     *
     * Default conversion:
     *     'lorem/ipsum/dolor'  ==>  'lorem\/ipsum\/dolor/'
     *
     * Use only / as directory separator (on Windows also).
     *
     * @param string $str Pattern: regexp or dirname.
     *
     * @return string regexp corresponding to a given string or regexp
     */
    protected function toRegex($str)
    {
        return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
CustomFilterIterator.php
1.508 KB
18 Dec 2019 11.24 AM
root / root
0644
DateRangeFilterIterator.php
1.427 KB
18 Dec 2019 11.24 AM
root / root
0644
DepthRangeFilterIterator.php
1.235 KB
18 Dec 2019 11.24 AM
root / root
0644
ExcludeDirectoryFilterIterator.php
1.402 KB
18 Dec 2019 11.24 AM
root / root
0644
FilePathsIterator.php
2.643 KB
18 Dec 2019 11.24 AM
root / root
0644
FileTypeFilterIterator.php
1.346 KB
18 Dec 2019 11.24 AM
root / root
0644
FilecontentFilterIterator.php
1.904 KB
18 Dec 2019 11.24 AM
root / root
0644
FilenameFilterIterator.php
1.685 KB
18 Dec 2019 11.24 AM
root / root
0644
FilterIterator.php
1.405 KB
18 Dec 2019 11.24 AM
root / root
0644
MultiplePcreFilterIterator.php
1.732 KB
18 Dec 2019 11.24 AM
root / root
0644
PathFilterIterator.php
1.914 KB
18 Dec 2019 11.24 AM
root / root
0644
RecursiveDirectoryIterator.php
2.976 KB
18 Dec 2019 11.24 AM
root / root
0644
SizeRangeFilterIterator.php
1.411 KB
18 Dec 2019 11.24 AM
root / root
0644
SortableIterator.php
2.485 KB
18 Dec 2019 11.24 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF