Automattic\WooCommerce\Internal\PushNotifications\Services
StepLogQuery::format_row
Shapes one row for the REST response.
Метод класса: StepLogQuery{}
Хуков нет.
Возвращает
array.
Использование
$result = StepLogQuery::format_row( $row ): array;
- $row(массив) (обязательный)
- The row as a reader produced it.
Код StepLogQuery::format_row() StepLogQuery::format row WC 11.3.0
private static function format_row( array $row ): array {
$formatted = array(
'timestamp' => gmdate( 'c', $row['timestamp'] ),
'level' => $row['level'],
'message' => $row['message'],
'context' => $row['context'],
);
// Only a line whose context did not parse has raw text to show, and for
// those it is all there is, since the context is null.
if ( null !== $row['raw'] ) {
$formatted['raw'] = $row['raw'];
}
return $formatted;
}