LanguagePackStatesStore
Service class that handles the read/write of the states of the downloaded language packs.
Reads and writes are serialized through the core locking API, so that concurrent callers (e.g. parallel language pack downloads from the backend UI and a CLI command) do not overwrite each other's changes.
This class is only meant to be used within EXT:core and is not part of the TYPO3 Core API.
Table of Contents
Methods
- __construct() : mixed
- get() : mixed
- set() : array<string|int, mixed>
- withBatch() : T
- Runs $work() with a single locked read-modify-write cycle shared by every set() call made from within it (directly, or indirectly through e.g. LanguagePackService), instead of one cycle per call. Intended for bulk operations such as updating many language packs in one request.
Methods
__construct()
public
__construct(LockFactory $lockFactory) : mixed
Parameters
- $lockFactory : LockFactory
get()
public
get(string $path) : mixed
Parameters
- $path : string
set()
public
set(string $path, mixed $input) : array<string|int, mixed>
Parameters
- $path : string
- $input : mixed
Tags
Return values
array<string|int, mixed>withBatch()
Runs $work() with a single locked read-modify-write cycle shared by every set() call made from within it (directly, or indirectly through e.g. LanguagePackService), instead of one cycle per call. Intended for bulk operations such as updating many language packs in one request.
public
withBatch(callable(): T $work) : T
Nested calls (a batch started while already inside one) join the running batch instead of acquiring the lock again.
Parameters
- $work : callable(): T