Neuron-PHP

Memory extends DestinationBase
in package

Appends log data to a string.

Access via the getData() method.

Table of Contents

Properties

$_data  : string
$_filters  : array<string|int, mixed>
$_format  : IFormat
$_parent  : ILogger|null
$_stdErr  : mixed
$_stdOut  : mixed

Methods

__construct()  : mixed
addFilter()  : bool
Adds a logging filter.
close()  : void
Closes the destination if required.
getData()  : string
getParent()  : ILogger
Gets the parent logger.
getStdErr()  : mixed
getStdOut()  : mixed
log()  : void
Handles writing the log data after filtering and formatting.
open()  : mixed
Opens the destination. Destinations may require parameters to be passed in.
removeFilter()  : bool
Removes a logging filter.
setData()  : Memory
setFileHandles()  : void
Maps STDERR and STDOUT to file handles in non-CLI environments.
setFormat()  : void
Sets the formatter.
setParent()  : void
Sets the parent logger.
write()  : void
Writes the formatted log data to the specific destination.

Properties

$_data

private string $_data = ''

Methods

getData()

public getData() : string
Return values
string

log()

Handles writing the log data after filtering and formatting.

public log(mixed $text, mixed $level[, mixed $context = [] ]) : void
Parameters
$text : mixed
  • Output that has been run through the formatter.
$level : mixed
  • Text output level.
$context : mixed = []
  • Optional context array

open()

Opens the destination. Destinations may require parameters to be passed in.

public open(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

removeFilter()

Removes a logging filter.

public removeFilter(IFilter $removeFilter) : bool
Parameters
$removeFilter : IFilter
Return values
bool

setData()

public setData(string $data) : Memory
Parameters
$data : string
Return values
Memory

setFileHandles()

Maps STDERR and STDOUT to file handles in non-CLI environments.

public setFileHandles() : void

write()

Writes the formatted log data to the specific destination.

protected write(string $text, Data $data) : void
Parameters
$text : string
$data : Data

        
On this page

Search results