Interface Yiisoft\Data\Reader\SortableDataInterface
| Extends | Yiisoft\Data\Reader\ReadableDataInterface |
|---|---|
| Implemented by | Yiisoft\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
| 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
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;
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;
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;
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;
Signup or Login in order to comment.