Documentation

SortableIterator
in package
implements IteratorAggregate

SortableIterator applies a sort on a given Iterator.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

IteratorAggregate

Table of Contents

SORT_BY_ACCESSED_TIME  = 3
SORT_BY_CHANGED_TIME  = 4
SORT_BY_MODIFIED_TIME  = 5
SORT_BY_NAME  = 1
SORT_BY_NAME_NATURAL  = 6
SORT_BY_NONE  = 0
SORT_BY_TYPE  = 2
$iterator  : mixed
$sort  : mixed
__construct()  : mixed
getIterator()  : Traversable

Constants

Properties

Methods

__construct()

public __construct(Traversable $iterator, int|callable $sort[, bool $reverseOrder = false ]) : mixed
Parameters
$iterator : Traversable

The Iterator to filter

$sort : int|callable

The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)

$reverseOrder : bool = false
Tags
throws
InvalidArgumentException
Return values
mixed

getIterator()

public getIterator() : Traversable
Return values
Traversable

Search results