ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
ScalarFormatter.php
Go to the documentation of this file.
1
<?
php
2
3
/*
4
* This file is part of the Monolog package.
5
*
6
* (c) Jordi Boggiano <j.boggiano@seld.be>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
Monolog\Formatter
;
13
20
class
ScalarFormatter
extends
NormalizerFormatter
21
{
25
public
function
format
(
array
$record)
26
{
27
foreach
($record as $key => $value) {
28
$record[$key] = $this->
normalizeValue
($value);
29
}
30
31
return
$record;
32
}
33
38
protected
function
normalizeValue
($value)
39
{
40
$normalized = $this->
normalize
($value);
41
42
if
(is_array($normalized) || is_object($normalized)) {
43
return
$this->
toJson
($normalized,
true
);
44
}
45
46
return
$normalized;
47
}
48
}
Monolog\Formatter\NormalizerFormatter\normalize
normalize($data)
Definition:
NormalizerFormatter.php:58
Monolog\Formatter
Definition:
ChromePHPFormatter.php:12
Monolog\Formatter\ScalarFormatter\normalizeValue
normalizeValue($value)
Definition:
ScalarFormatter.php:38
Monolog\Formatter\ScalarFormatter\format
format(array $record)
{Formats a log record.A record to format mixed The formatted record}
Definition:
ScalarFormatter.php:25
Monolog\Formatter\NormalizerFormatter
Normalizes incoming records to remove objects/resources so it's easier to dump to various targets...
Definition:
NormalizerFormatter.php:21
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
Monolog\Formatter\NormalizerFormatter\toJson
toJson($data, $ignoreErrors=false)
Return the JSON representation of a value.
Definition:
NormalizerFormatter.php:172
Monolog\Formatter\ScalarFormatter
Formats data into an associative array of scalar values.
Definition:
ScalarFormatter.php:20
php
libs
composer
vendor
monolog
monolog
src
Monolog
Formatter
ScalarFormatter.php
Generated on Fri Jan 17 2025 19:00:51 for ILIAS by
1.8.13 (using
Doxyfile
)