Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.41
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
Symfony /
Component /
Finder /
Iterator /
Delete
Unzip
Name
Size
Permission
Date
Action
CustomFilterIterator.php
1.51
KB
-rw-r--r--
2016-06-06 18:05
DateRangeFilterIterator.php
1.44
KB
-rw-r--r--
2016-06-06 18:05
DepthRangeFilterIterator.php
1.22
KB
-rw-r--r--
2016-06-06 18:05
ExcludeDirectoryFilterIterator.php
2.39
KB
-rw-r--r--
2016-06-06 18:05
FilePathsIterator.php
2.83
KB
-rw-r--r--
2016-06-06 18:05
FileTypeFilterIterator.php
1.34
KB
-rw-r--r--
2016-06-06 18:05
FilecontentFilterIterator.php
1.41
KB
-rw-r--r--
2016-06-06 18:05
FilenameFilterIterator.php
1.15
KB
-rw-r--r--
2016-06-06 18:05
FilterIterator.php
1.64
KB
-rw-r--r--
2016-06-06 18:05
MultiplePcreFilterIterator.php
3.18
KB
-rw-r--r--
2016-06-06 18:05
PathFilterIterator.php
1.42
KB
-rw-r--r--
2016-06-06 18:05
RecursiveDirectoryIterator.php
4.29
KB
-rw-r--r--
2016-06-06 18:05
SizeRangeFilterIterator.php
1.41
KB
-rw-r--r--
2016-06-06 18:05
SortableIterator.php
2.47
KB
-rw-r--r--
2016-06-06 18:05
Save
Rename
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder\Iterator; /** * SortableIterator applies a sort on a given Iterator. * * @author Fabien Potencier <fabien@symfony.com> */ class SortableIterator implements \IteratorAggregate { const SORT_BY_NAME = 1; const SORT_BY_TYPE = 2; const SORT_BY_ACCESSED_TIME = 3; const SORT_BY_CHANGED_TIME = 4; const SORT_BY_MODIFIED_TIME = 5; private $iterator; private $sort; /** * Constructor. * * @param \Traversable $iterator The Iterator to filter * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) * * @throws \InvalidArgumentException */ public function __construct(\Traversable $iterator, $sort) { $this->iterator = $iterator; if (self::SORT_BY_NAME === $sort) { $this->sort = function ($a, $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }; } elseif (self::SORT_BY_TYPE === $sort) { $this->sort = function ($a, $b) { if ($a->isDir() && $b->isFile()) { return -1; } elseif ($a->isFile() && $b->isDir()) { return 1; } return strcmp($a->getRealpath(), $b->getRealpath()); }; } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { $this->sort = function ($a, $b) { return $a->getATime() - $b->getATime(); }; } elseif (self::SORT_BY_CHANGED_TIME === $sort) { $this->sort = function ($a, $b) { return $a->getCTime() - $b->getCTime(); }; } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { $this->sort = function ($a, $b) { return $a->getMTime() - $b->getMTime(); }; } elseif (is_callable($sort)) { $this->sort = $sort; } else { throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); } } public function getIterator() { $array = iterator_to_array($this->iterator, true); uasort($array, $this->sort); return new \ArrayIterator($array); } }