Normalizes incoming records to remove objects/resources so it's easier to dump to various targets

CloneableInstantiable
ImplementsMonolog\Formatter\FormatterInterface
Constants
public Monolog\Formatter\NormalizerFormatter::SIMPLE_DATE = 'Y-m-d\TH:i:sP'
Methods
public __construct(?string $dateFormat = NULL)
 
    public addJsonEncodeOption( $option)
    public format(array $record)
     

    {@inheritdoc}

    public formatBatch(array $records)
     

    {@inheritdoc}

    public getMaxNormalizeDepth() : int
     

    The maximum number of normalization levels to go through

    public getMaxNormalizeItemCount() : int
     

    The maximum number of items to normalize per level

    public removeJsonEncodeOption( $option)
    public setJsonPrettyPrint(bool $enable) : self
     

    Enables json_encode pretty print.

    public setMaxNormalizeDepth(int $maxNormalizeDepth) : self
    public setMaxNormalizeItemCount(int $maxNormalizeItemCount) : self
    Properties
    protected $dateFormat
    protected $maxNormalizeDepth
    protected $maxNormalizeItemCount
    Methods
    protected formatDate(DateTimeInterface $date)
    protected normalize( $data, int $depth = 0)
     
    • return int|bool|string|null|array
    protected normalizeException(Throwable $e, int $depth = 0)
     
    • return array
    protected toJson( $data, bool $ignoreErrors = false) : string
     

    Return the JSON representation of a value

    • throws RuntimeException if encoding fails and errors are not ignored
    • return string if encoding fails and ignoreErrors is true 'null' is returned
    Properties
    private $jsonEncodeOptions
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only