|
|
@ -7,6 +7,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
namespace yii\mongodb\debug; |
|
|
|
namespace yii\mongodb\debug; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use yii\base\Application; |
|
|
|
|
|
|
|
use yii\base\BootstrapInterface; |
|
|
|
use yii\debug\panels\DbPanel; |
|
|
|
use yii\debug\panels\DbPanel; |
|
|
|
use yii\log\Logger; |
|
|
|
use yii\log\Logger; |
|
|
|
|
|
|
|
|
|
|
@ -16,9 +18,22 @@ use yii\log\Logger; |
|
|
|
* @author Klimov Paul <klimov@zfort.com> |
|
|
|
* @author Klimov Paul <klimov@zfort.com> |
|
|
|
* @since 2.0.1 |
|
|
|
* @since 2.0.1 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class MongoDbPanel extends DbPanel |
|
|
|
class MongoDbPanel extends DbPanel implements BootstrapInterface |
|
|
|
{ |
|
|
|
{ |
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* Bootstrap method to be called during application bootstrap stage. |
|
|
|
|
|
|
|
* @param Application $app the application currently running |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function bootstrap($app) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$modules = $app->getModules(); |
|
|
|
|
|
|
|
if(isset($modules['debug'])){ |
|
|
|
|
|
|
|
$modules['debug']['panels']['mongodb'] = ['class'=>self::className()]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$app->setModules($modules); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @inheritdoc |
|
|
|
* @inheritdoc |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function getName() |
|
|
|
public function getName() |
|
|
@ -48,4 +63,5 @@ class MongoDbPanel extends DbPanel |
|
|
|
'yii\mongodb\Database::*', |
|
|
|
'yii\mongodb\Database::*', |
|
|
|
]); |
|
|
|
]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |