mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 02:31:25 +02:00
Update AggregatedCollector.php
This commit is contained in:
@@ -23,7 +23,7 @@ use DebugBar\DebugBarException;
|
||||
* $aggcollector['msg1']->addMessage('hello world');
|
||||
* </code>
|
||||
*/
|
||||
class AggregatedCollector implements DataCollectorInterface, ArrayAccess
|
||||
class AggregatedCollector implements DataCollectorInterface, ArrayAccess, Resettable
|
||||
{
|
||||
protected $name;
|
||||
|
||||
@@ -100,6 +100,20 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess
|
||||
return $this->sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset all aggregated collectors
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
foreach ($this->collectors as $collector) {
|
||||
if ($collector instanceof Resettable) {
|
||||
$collector->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function collect()
|
||||
{
|
||||
$aggregate = array();
|
||||
|
Reference in New Issue
Block a user