\DebugBar\DataCollectorMessagesCollector

Provides a way to log messages

Summary

Methods
Properties
Constants
__construct()
setDataFormatter()
getDataFormatter()
addMessage()
aggregate()
getMessages()
log()
clear()
collect()
getName()
getWidgets()
No public properties found
No constants found
No protected methods found
$name
$messages
$aggregates
$dataFormater
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : 

Type

$messages

$messages : 

Type

$aggregates

$aggregates : 

Type

$dataFormater

$dataFormater : 

Type

Methods

__construct()

__construct(string  $name = 'messages') 

Parameters

string $name

setDataFormatter()

setDataFormatter(\DebugBar\DataFormatter\DataFormatterInterface  $formater) : $this

Sets the data formater instance used by this collector

Parameters

\DebugBar\DataFormatter\DataFormatterInterface $formater

Returns

$this

addMessage()

addMessage(mixed  $message, string  $label = 'info',   $isString = true) 

Adds a message

A message can be anything from an object to a string

Parameters

mixed $message
string $label
$isString

getMessages()

getMessages() : array

Returns collected messages

Returns

array

log()

log(  $level,   $message, array  $context = array()) 

Parameters

$level
$message
array $context

clear()

clear() 

Deletes all messages

collect()

collect() : array

Called by the DebugBar when data needs to be collected

Returns

array

getName()

getName() : string

Returns the unique name of the collector

Returns

string

getWidgets()

getWidgets() : array

Returns a hash where keys are control names and their values an array of options as defined in {@see DebugBar\JavascriptRenderer::addControl()}

Returns

array