(PHP 5 >= 5.2.0, PHP 7, PHP 8)
CachingIterator::offsetSet — Set an element in the cache
Stores value under key in
the cache.
This method is called when a value is assigned to the
CachingIterator with array syntax, such as
$iterator['key'] = $value.
The inner iterator is not modified.
The CachingIterator::FULL_CACHE flag must be set.
keyThe key of the element to be set.
value
The new value for the key.
No value is returned.
Throws a BadMethodCallException if the
CachingIterator::FULL_CACHE flag is not set.