0 follower

Interface Yiisoft\Data\Reader\LimitableDataInterface

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

Data that could be limited.

Public Methods

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

Hide inherited methods

getLimit() public abstract method

Get current limit.

public abstract integer|null getLimit ( )
return integer|null

Limit. null means no limit.

                public function getLimit(): ?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;

            
withLimit() public abstract method

Get a new instance with the limit set.

public abstract Yiisoft\Data\Reader\LimitableDataInterface withLimit ( integer|null $limit )
$limit integer|null

Limit. null means no limit.

return Yiisoft\Data\Reader\LimitableDataInterface

New instance.

throws InvalidArgumentException

If the limit is less than zero.

                public function withLimit(?int $limit): static;