Interface Yiisoft\Data\Reader\LimitableDataInterface
| Extends | Yiisoft\Data\Reader\ReadableDataInterface |
|---|---|
| Implemented by | Yiisoft\Data\Reader\DataReaderInterface |
Data that could be limited.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getLimit() | Get current limit. | Yiisoft\Data\Reader\LimitableDataInterface |
| 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 |
| withLimit() | Get a new instance with the limit set. | Yiisoft\Data\Reader\LimitableDataInterface |
Method Details
Get current limit.
| public abstract integer|null getLimit ( ) | ||
| return | integer|null |
Limit. |
|---|---|---|
public function getLimit(): ?int;
Defined in: Yiisoft\Data\Reader\ReadableDataInterface::read()
Get iterable for the data set.
| public abstract iterable read ( ) | ||
| 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 array|object|null readOne ( ) | ||
| return | array|object|null |
An item or null if there is none. |
|---|---|---|
public function readOne(): array|object|null;
Get a new instance with the limit set.
| public abstract Yiisoft\Data\Reader\LimitableDataInterface withLimit ( integer|null $limit ) | ||
| $limit | integer|null |
Limit. |
| return | Yiisoft\Data\Reader\LimitableDataInterface |
New instance. |
|---|---|---|
| throws | InvalidArgumentException |
If the limit is less than zero. |
public function withLimit(?int $limit): static;
Signup or Login in order to comment.