LogDataTrait

trait \TYPO3\CMS\Core\Log\LogDataTrait

Helper for handling both serialize()/unserialize() and json_encode()/json_decode() when migrating to json-encoded strings.

Table of Contents

Methods

formatLogDetails()  : string
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
formatLogDetailsStatic()  : string
Static version for ViewHelpers etc.
unserializeLogData()  : array|null
Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

Methods

formatLogDetails()

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

protected formatLogDetails(string $detailString, mixed $substitutes) : string

Parameters

$detailString : string
$substitutes : mixed

Return values

string

formatLogDetailsStatic()

Static version for ViewHelpers etc.

protected static formatLogDetailsStatic(string $detailString, array $substitutes) : string

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

Parameters

$detailString : string
$substitutes : array

Return values

string

unserializeLogData()

Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

protected unserializeLogData(mixed $logData) : array|null

Parameters

$logData : mixed

Return values

array|null
On this page