Class yii\mongodb\debug\MongoDbPanel
Inheritance | yii\mongodb\debug\MongoDbPanel » yii\debug\panels\DbPanel |
---|---|
Available since extension's version | 2.0.1 |
Source Code | https://github.com/yiisoft/yii2-mongodb/blob/master/debug/MongoDbPanel.php |
MongoDbPanel panel that collects and displays MongoDB queries performed.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$db | yii\mongodb\debug\MongoDbPanel |
Public Methods
Method | Description | Defined By |
---|---|---|
canBeExplained() | yii\mongodb\debug\MongoDbPanel | |
getName() | yii\mongodb\debug\MongoDbPanel | |
getProfileLogs() | Returns all profile logs of the current request for this panel. | yii\mongodb\debug\MongoDbPanel |
getSummaryName() | yii\mongodb\debug\MongoDbPanel | |
init() | yii\mongodb\debug\MongoDbPanel |
Protected Methods
Method | Description | Defined By |
---|---|---|
getQueryType() | yii\mongodb\debug\MongoDbPanel | |
hasExplain() | yii\mongodb\debug\MongoDbPanel |
Property Details
Method Details
public static void canBeExplained ( $type ) | ||
$type |
public static function canBeExplained($type)
{
return $type === 'find';
}
Returns all profile logs of the current request for this panel.
public array getProfileLogs ( ) |
public function getProfileLogs()
{
$target = $this->module->logTarget;
return $target->filterMessages($target->messages, Logger::LEVEL_PROFILE, [
'yii\mongodb\Collection::*',
'yii\mongodb\Query::*',
'yii\mongodb\Database::*',
]);
}
protected void getQueryType ( $timing ) | ||
$timing |
protected function getQueryType($timing)
{
$timing = ltrim($timing);
$timing = mb_substr($timing, 0, mb_strpos($timing, '('), 'utf8');
$matches = explode('.', $timing);
return count($matches) ? array_pop($matches) : '';
}
public void init ( ) |
public function init()
{
$this->actions['db-explain'] = [
'class' => 'yii\\mongodb\\debug\\ExplainAction',
'panel' => $this,
];
}