SortableIterator
in package
implements
IteratorAggregate
SortableIterator applies a sort on a given Iterator.
Tags
Table of Contents
Interfaces
- IteratorAggregate
Constants
- SORT_BY_ACCESSED_TIME = 3
- SORT_BY_CHANGED_TIME = 4
- SORT_BY_EXTENSION = 9
- SORT_BY_MODIFIED_TIME = 5
- SORT_BY_NAME = 1
- SORT_BY_NAME_CASE_INSENSITIVE = 7
- SORT_BY_NAME_NATURAL = 6
- SORT_BY_NAME_NATURAL_CASE_INSENSITIVE = 8
- SORT_BY_NONE = 0
- SORT_BY_SIZE = 10
- SORT_BY_TYPE = 2
Properties
Methods
- __construct() : mixed
- getIterator() : Traversable
Constants
SORT_BY_ACCESSED_TIME
public
mixed
SORT_BY_ACCESSED_TIME
= 3
SORT_BY_CHANGED_TIME
public
mixed
SORT_BY_CHANGED_TIME
= 4
SORT_BY_EXTENSION
public
mixed
SORT_BY_EXTENSION
= 9
SORT_BY_MODIFIED_TIME
public
mixed
SORT_BY_MODIFIED_TIME
= 5
SORT_BY_NAME
public
mixed
SORT_BY_NAME
= 1
SORT_BY_NAME_CASE_INSENSITIVE
public
mixed
SORT_BY_NAME_CASE_INSENSITIVE
= 7
SORT_BY_NAME_NATURAL
public
mixed
SORT_BY_NAME_NATURAL
= 6
SORT_BY_NAME_NATURAL_CASE_INSENSITIVE
public
mixed
SORT_BY_NAME_NATURAL_CASE_INSENSITIVE
= 8
SORT_BY_NONE
public
mixed
SORT_BY_NONE
= 0
SORT_BY_SIZE
public
mixed
SORT_BY_SIZE
= 10
SORT_BY_TYPE
public
mixed
SORT_BY_TYPE
= 2
Properties
$iterator
private
Traversable<string, SplFileInfo>
$iterator
$sort
private
Closure|int
$sort
Methods
__construct()
public
__construct(Traversable<string, SplFileInfo> $iterator, int|callable $sort[, bool $reverseOrder = false ]) : mixed
Parameters
- $iterator : Traversable<string, SplFileInfo>
- $sort : int|callable
-
The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
- $reverseOrder : bool = false
Tags
getIterator()
public
getIterator() : Traversable