Constants

PROTOCOL_URI

PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'

WildFire JSON header message format

STRUCTURE_URI

STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'

FirePHP structure for parsing messages & their presentation

PLUGIN_URI

PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'

Must reference a "known" plugin, otherwise headers won't display in FirePHP

HEADER_PREFIX

HEADER_PREFIX = 'X-Wf'

Header prefix for Wildfire to recognize & parse headers

Properties

$processors

$processors : callable[]

Type

callable[]

$formatter

$formatter : ?\Monolog\Formatter\FormatterInterface

Type

FormatterInterface

$level

$level : int

Type

int

$bubble

$bubble : bool

Type

bool

$initialized

$initialized : bool

Whether or not Wildfire vendor-specific headers have been generated & sent yet

Type

bool

$messageIndex

$messageIndex : int

Shared static message index between potentially multiple handlers

Type

int

$sendHeaders

$sendHeaders : bool

Type

bool

Methods

handle()

handle(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

reset()

reset() : void

pushProcessor()

pushProcessor(callable  $callback) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

callable $callback

Returns

\Monolog\Handler\HandlerInterface —

popProcessor()

popProcessor() : callable

{@inheritDoc}

Returns

callable —

setFormatter()

setFormatter(\Monolog\Formatter\FormatterInterface  $formatter) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

\Monolog\Formatter\FormatterInterface $formatter

Returns

\Monolog\Handler\HandlerInterface —

getFormatter()

getFormatter() : \Monolog\Formatter\FormatterInterface

{@inheritDoc}

Returns

\Monolog\Formatter\FormatterInterface —

__construct()

__construct(int|string  $level = Logger::DEBUG, bool  $bubble = true) : mixed

Parameters

int|string $level

The minimum logging level at which this handler will be triggered

bool $bubble

Whether the messages that are handled can bubble up the stack or not

Returns

mixed —

isHandling()

isHandling(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

setLevel()

setLevel(mixed  $level) : self

Sets minimum logging level at which this handler will be triggered.

Parameters

mixed $level

Returns

self —

getLevel()

getLevel() : int

Gets minimum logging level at which this handler will be triggered.

Returns

int —

setBubble()

setBubble(bool  $bubble) : self

Sets the bubbling behavior.

Parameters

bool $bubble

true means that this handler allows bubbling. false means that bubbling is not permitted.

Returns

self —

getBubble()

getBubble() : bool

Gets the bubbling behavior.

Returns

bool —

true means that this handler allows bubbling. false means that bubbling is not permitted.

handleBatch()

handleBatch(array  $records) : void

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

close()

close() : void

Closes the handler.

__destruct()

__destruct() : mixed

Returns

mixed —

__sleep()

__sleep() : mixed

Returns

mixed —

isWebRequest()

isWebRequest() : bool

Checks if PHP's serving a web request

Returns

bool —

write()

write(array  $record) : void

Creates & sends header for a record, ensuring init headers have been sent prior

Parameters

array $record

processRecord()

processRecord(array  $record) : array

Processes a record.

Parameters

array $record

Returns

array —

resetProcessors()

resetProcessors() : void

getDefaultFormatter()

getDefaultFormatter() : \Monolog\Formatter\FormatterInterface

{@inheritDoc}

Returns

\Monolog\Formatter\FormatterInterface —

createHeader()

createHeader((int|string)[]  $meta, string  $message) : array<string,string>

Base header creation function used by init headers & record headers

Parameters

(int|string)[] $meta

Wildfire Plugin, Protocol & Structure Indexes

string $message

Log message

Returns

array

Complete header string ready for the client as key and message as value

createRecordHeader()

createRecordHeader(array  $record) : array<string,string>

Creates message header from record

Parameters

array $record

Returns

array

getInitHeaders()

getInitHeaders() : array<string,string>

Wildfire initialization headers to enable message parsing

Returns

array

sendHeader()

sendHeader(string  $header, string  $content) : void

Send header string to the client

Parameters

string $header
string $content

headersAccepted()

headersAccepted() : bool

Verifies if the headers are accepted by the current user agent

Returns

bool —