PHPXMLRPC 4.11.0

Logger
in package

Tags
todo

implement an interface

todo

make constructor private to force users to go through instance() ?

Table of Contents

Properties

$instance  : mixed

Methods

debug()  : void
NB: unlike other "traditional" loggers, this one echoes to screen the debug messages instead of logging them.
error()  : void
Triggers the writing of a message to php's error log
instance()  : Logger
This class can be used as singleton, so that later we can move to DI patterns (ish...)
warning()  : void
Following the general principle of 'never break stdout', the default behaviour

Properties

$instance

protected static mixed $instance = null

Methods

debug()

NB: unlike other "traditional" loggers, this one echoes to screen the debug messages instead of logging them.

public debug(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()

known key: 'encoding'

error()

Triggers the writing of a message to php's error log

public error(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = array()

instance()

This class can be used as singleton, so that later we can move to DI patterns (ish...)

public static instance() : Logger
Return values
Logger

warning()

Following the general principle of 'never break stdout', the default behaviour

public warning(string $message[, mixed $context = array() ]) : void
Parameters
$message : string
$context : mixed = array()

        
On this page

Search results