SortableIterator

SortableIterator

class SortableIterator implements IteratorAggregate

SortableIterator applies a sort on a given Iterator.

Constants

SORT_BY_NAME
SORT_BY_TYPE
SORT_BY_ACCESSED_TIME
SORT_BY_CHANGED_TIME
SORT_BY_MODIFIED_TIME

Methods

__construct(Traversable $iterator, int|callable $sort)

Constructor.

getIterator()

Details

__construct(Traversable $iterator, int|callable $sort)

Constructor.

Parameters

Traversable $iterator The Iterator to filter
int|callable $sort The sort type (SORTBYNAME, SORTBYTYPE, or a PHP callback)

Exceptions

InvalidArgumentException

getIterator()

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Finder/Iterator/SortableIterator.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部