class CacheEntryIterator implements Iterator (View source)

An iterator for cache entries

Properties

protected FrontendInterface $frontend
protected IterableBackendInterface $backend

Methods

__construct(FrontendInterface $frontend, IterableBackendInterface $backend)

Constructs this Iterator

mixed
current()

Returns the data of the current cache entry pointed to by the cache entry iterator.

void
next()

Move forward to the next cache entry

string
key()

Returns the identifier of the current cache entry pointed to by the cache entry iterator.

bool
valid()

Checks if current position of the cache entry iterator is valid

void
rewind()

Rewind the cache entry iterator to the first element

Details

__construct(FrontendInterface $frontend, IterableBackendInterface $backend)

Constructs this Iterator

Parameters

FrontendInterface $frontend

Frontend of the cache to iterate over

IterableBackendInterface $backend

Backend of the cache

mixed current()

Returns the data of the current cache entry pointed to by the cache entry iterator.

Return Value

mixed

void next()

Move forward to the next cache entry

Return Value

void

string key()

Returns the identifier of the current cache entry pointed to by the cache entry iterator.

Return Value

string

bool valid()

Checks if current position of the cache entry iterator is valid

Return Value

bool

true if the current element of the iterator is valid, otherwise false

void rewind()

Rewind the cache entry iterator to the first element

Return Value

void