mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
Make PDOCollector easy to extend (#582)
This commit is contained in:
parent
912691590f
commit
958ac08897
@ -204,7 +204,7 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'pdo';
|
||||
return 'database';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -212,15 +212,17 @@ class PDOCollector extends DataCollector implements Renderable, AssetProvider
|
||||
*/
|
||||
public function getWidgets()
|
||||
{
|
||||
$name = $this->getName();
|
||||
|
||||
return array(
|
||||
"database" => array(
|
||||
"$name" => array(
|
||||
"icon" => "database",
|
||||
"widget" => "PhpDebugBar.Widgets.SQLQueriesWidget",
|
||||
"map" => "pdo",
|
||||
"map" => "$name",
|
||||
"default" => "[]"
|
||||
),
|
||||
"database:badge" => array(
|
||||
"map" => "pdo.nb_statements",
|
||||
"$name:badge" => array(
|
||||
"map" => "$name.nb_statements",
|
||||
"default" => 0
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user