0 follower

Interface Yiisoft\Data\Reader\OffsetableDataInterface

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

Data that could be read from Nth item by skipping items from the beginning.

Public Methods

Hide inherited 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

Hide inherited methods

getOffset() public abstract method

Get current offset.

public abstract integer getOffset ( )
return integer

Offset.

                public function getOffset(): int;

            
read() public abstract method

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;

            
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 array|object|null readOne ( )
return array|object|null

An item or null if there is none.

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

            
withOffset() public abstract method

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;