LanguagePackStatesStore

final class \TYPO3\CMS\Core\Localization\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.

Table of Contents

Methods

__construct()  : mixed
get()  : mixed
set()  : array
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

get()

public get(string $path) : mixed

Parameters

$path : string

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

Tags

template
throws
LockAcquireException
throws
LockAcquireWouldBlockException
throws
LockCreateException

Return values

T
On this page