Http
extends AbstractWriter
in package
Http log writer class
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- getClient() : Client
- Get client
- getContext() : string
- Get context for log
- getLogLimit() : int|null
- Get log limit
- hasLogLimit() : bool
- Has log limit
- isWithinLogLimit() : bool
- Check if a log level is within the set log level limit
- setLogLimit() : AbstractWriter
- Set log limit
- writeLog() : Http
- Write to the log
Properties
$client
Stream object
protected
Client|null
$client
= null
$limit
Log limit
protected
int|null
$limit
= null
Methods
__construct()
Constructor
public
__construct(Client $client) : mixed
Instantiate the Mail writer object
Parameters
- $client : Client
getClient()
Get client
public
getClient() : Client
Return values
ClientgetContext()
Get context for log
public
getContext([array<string|int, mixed> $context = [] ]) : string
Parameters
- $context : array<string|int, mixed> = []
Return values
stringgetLogLimit()
Get log limit
public
getLogLimit() : int|null
Return values
int|nullhasLogLimit()
Has log limit
public
hasLogLimit() : bool
Return values
boolisWithinLogLimit()
Check if a log level is within the set log level limit
public
isWithinLogLimit(int $level) : bool
Parameters
- $level : int
Return values
boolsetLogLimit()
Set log limit
public
setLogLimit(int $level) : AbstractWriter
Parameters
- $level : int
Return values
AbstractWriterwriteLog()
Write to the log
public
writeLog(mixed $level, string $message[, array<string|int, mixed> $context = [] ]) : Http
Parameters
- $level : mixed
- $message : string
- $context : array<string|int, mixed> = []