ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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, $depth=0)
Definition:
NormalizerFormatter.php:59
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:22
Monolog\Formatter\NormalizerFormatter\toJson
toJson($data, $ignoreErrors=false)
Return the JSON representation of a value.
Definition:
NormalizerFormatter.php:189
Monolog\Formatter\ScalarFormatter
Formats data into an associative array of scalar values.
Definition:
ScalarFormatter.php:20
php
$key
$key
Definition:
croninfo.php:18
libs
composer
vendor
monolog
monolog
src
Monolog
Formatter
ScalarFormatter.php
Generated on Thu Jan 16 2025 19:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)