\DebugBar\DataCollectorAggregatedCollector

Aggregates data from multiple collectors

$aggcollector = new AggregateCollector('foobar'); $aggcollector->addCollector(new MessagesCollector('msg1')); $aggcollector->addCollector(new MessagesCollector('msg2')); $aggcollector['msg1']->addMessage('hello world');

Summary

Methods
Properties
Constants
__construct()
addCollector()
getCollectors()
setMergeProperty()
getMergeProperty()
setSort()
getSort()
collect()
getName()
offsetSet()
offsetGet()
offsetExists()
offsetUnset()
No public properties found
No constants found
sort()
$name
$mergeProperty
$sort
$collectors
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : 

Type

$mergeProperty

$mergeProperty : 

Type

$sort

$sort : 

Type

$collectors

$collectors : 

Type

Methods

__construct()

__construct(string  $name, string  $mergeProperty = null, boolean  $sort = false) 

Parameters

string $name
string $mergeProperty
boolean $sort

getCollectors()

getCollectors() : array

Returns

array

setMergeProperty()

setMergeProperty(string  $property) 

Merge data from one of the key/value pair of the collected data

Parameters

string $property

getMergeProperty()

getMergeProperty() : string

Returns

string

setSort()

setSort(boolean|string  $sort) 

Sorts the collected data

If true, sorts using sort() If it is a string, sorts the data using the value from a key/value pair of the array

Parameters

boolean|string $sort

getSort()

getSort() : boolean|string

Returns

boolean|string

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

offsetSet()

offsetSet(mixed  $key, mixed  $value) 

Parameters

mixed $key
mixed $value

Throws

\DebugBar\DebugBarException

offsetGet()

offsetGet(mixed  $key) : mixed

Parameters

mixed $key

Returns

mixed

offsetExists()

offsetExists(mixed  $key) : boolean

Parameters

mixed $key

Returns

boolean

offsetUnset()

offsetUnset(mixed  $key) 

Parameters

mixed $key

Throws

\DebugBar\DebugBarException

sort()

sort(array  $data) : array

Sorts the collected data

Parameters

array $data

Returns

array