Skip to content

Commit cbe1b50

Browse files
authored
Update StandardDebugBar.php
1 parent 492a1a2 commit cbe1b50

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/DebugBar/StandardDebugBar.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*/
2323
class StandardDebugBar extends DebugBar
2424
{
25+
protected static $instance;
26+
2527
public function __construct()
2628
{
2729
$this->addCollector(new PhpInfoCollector());
@@ -31,4 +33,16 @@ public function __construct()
3133
$this->addCollector(new MemoryCollector());
3234
$this->addCollector(new ExceptionsCollector());
3335
}
36+
37+
/**
38+
* class instance
39+
*
40+
* @return StandardDebugBar
41+
*/
42+
public static function get_instance(){
43+
if(!self::$instance instanceof StandardDebugBar){
44+
self::$instance = new StandardDebugBar();
45+
}
46+
return self::$instance;
47+
}
3448
}

0 commit comments

Comments
 (0)