0 follower

Interface Yiisoft\Data\Reader\ReadableDataInterface

Implemented byYiisoft\Data\Paginator\PaginatorInterface, Yiisoft\Data\Reader\FilterableDataInterface, Yiisoft\Data\Reader\LimitableDataInterface, Yiisoft\Data\Reader\OffsetableDataInterface, Yiisoft\Data\Reader\SortableDataInterface

Readable data is a data set that could be read up by getting an iterator or reading one item from a set.

Public Methods

Hide inherited methods

Method Description Defined By
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

Method Details

Hide inherited methods

read() public abstract method

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

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;