0 follower

Interface Yiisoft\Data\Reader\SortableDataInterface

ExtendsYiisoft\Data\Reader\ReadableDataInterface
Implemented byYiisoft\Data\Reader\DataReaderInterface

A data set that could be sorted.

The sorting set may be used by a data reader that supports sorting.

Public Methods

Hide inherited methods

Method Description Defined By
getSort() Get a current sorting criteria. Yiisoft\Data\Reader\SortableDataInterface
read() Get iterable for the data set. Yiisoft\Data\Reader\ReadableDataInterface
readOne() Get one item from the data set. Which item is returned is up to implementation. Yiisoft\Data\Reader\ReadableDataInterface
withSort() Get a new instance with a sorting set. Yiisoft\Data\Reader\SortableDataInterface

Method Details

Hide inherited methods

getSort() public abstract method

Get a current sorting criteria.

public abstract getSort( ): Yiisoft\Data\Reader\Sort|null
return Yiisoft\Data\Reader\Sort|null

Current sorting criteria or null for no sorting.

                public function getSort(): ?Sort;

            
read() public abstract method

Defined in: Yiisoft\Data\Reader\ReadableDataInterface::read()

Get iterable for the data set.

public abstract read( ): iterable
return iterable

Iterable for the data. Note that keys could be anything so you shouldn't rely on these.

                public function read(): iterable;

            
readOne() public abstract method

Defined in: Yiisoft\Data\Reader\ReadableDataInterface::readOne()

Get one item from the data set. Which item is returned is up to implementation.

Note that invoking this method doesn't impact the data set or its pointer.

public abstract readOne( ): array|object|null
return array|object|null

An item or null if there is none.

                public function readOne(): array|object|null;

            
withSort() public abstract method

Get a new instance with a sorting set.

public abstract withSort( Yiisoft\Data\Reader\Sort|null $sort ): Yiisoft\Data\Reader\SortableDataInterface
$sort Yiisoft\Data\Reader\Sort|null

Sorting criteria or null for no sorting.

return Yiisoft\Data\Reader\SortableDataInterface

New instance.

                public function withSort(?Sort $sort): static;