Interface Yiisoft\Data\Reader\OffsetableDataInterface
| Extends | Yiisoft\Data\Reader\ReadableDataInterface |
|---|---|
| Implemented by | Yiisoft\Data\Reader\DataReaderInterface |
Data that could be read from Nth item by skipping items from the beginning.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getOffset() | Get current offset. | Yiisoft\Data\Reader\OffsetableDataInterface |
| 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 |
| withOffset() | Get a new instance with an offset set. | Yiisoft\Data\Reader\OffsetableDataInterface |
Method Details
Get current offset.
| public abstract integer getOffset ( ) | ||
| return | integer |
Offset. |
|---|---|---|
public function getOffset(): 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 an offset set.
| public abstract $this withOffset ( integer $offset ) | ||
| $offset | integer |
Offset. |
| return | $this |
New instance. |
|---|---|---|
public function withOffset(int $offset): static;
Signup or Login in order to comment.