$resolved
$resolved : ?\Drupal\strata\Capture\KeyRecorder
The recorder once a closure has been called, so it is resolved once per store.
Records key-value writes by wrapping one collection's store.
Key-value has no events either, and unlike state it comes from a factory, so the factory is decorated and each store it hands out is wrapped in one of these.
The subject is collection:key, so two collections holding the same key are two subjects and a
restore of one does not touch the other.
$resolved : ?\Drupal\strata\Capture\KeyRecorder
The recorder once a closure has been called, so it is resolved once per store.
$recorder : \Drupal\strata\Capture\KeyRecorder|\Closure
__construct(\Drupal\Core\KeyValueStore\KeyValueStoreInterface $inner, \Drupal\strata\Capture\KeyRecorder|\Closure $recorder, string $collection) : mixed
Constructs the decorator.
| \Drupal\Core\KeyValueStore\KeyValueStoreInterface | $inner | The store being wrapped. |
| \Drupal\strata\Capture\KeyRecorder|\Closure | $recorder | Journals each write, or a closure returning one. |
| string | $collection | The collection name, which becomes part of the subject path. |
setIfNotExists(mixed $key, mixed $value) : mixed
{@inheritdoc}
Recorded only when the write actually happened. The whole point of this method is that it does nothing when the key is taken, and recording a change that did not occur would put a value in the history that was never in the site.
| mixed | $key | |
| mixed | $value |
recorder() : \Drupal\strata\Capture\KeyRecorder
The recorder, resolved on first use.
A closure rather than a recorder is what a site is wired with, because keyvalue is asked for
a store while the container is still compiling and a recorder cannot be built then. Reading a
value never resolves it; only a write does, by which time the container is finished.
The recorder.