Class yii\mongodb\debug\MongoDbPanel

Inheritanceyii\mongodb\debug\MongoDbPanel » yii\debug\panels\DbPanel
Available since extension's version2.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

Hide inherited properties

Property Type Description Defined By
$db yii\mongodb\debug\MongoDbPanel

Property Details

Hide inherited properties

$db public property
public $db 'mongodb'

Method Details

Hide inherited methods

canBeExplained() public static method

public static void canBeExplained ( $type )
$type

                public static function canBeExplained($type)
{
    return $type === 'find';
}

            
getName() public method

public void getName ( )

                public function getName()
{
    return 'MongoDB';
}

            
getProfileLogs() public method

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::*',
    ]);
}

            
getQueryType() protected method

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) : '';
}

            
getSummaryName() public method

public void getSummaryName ( )

                public function getSummaryName()
{
    return 'MongoDB';
}

            
hasExplain() protected method

protected void hasExplain ( )

                protected function hasExplain()
{
    return true;
}

            
init() public method

public void init ( )

                public function init()
{
    $this->actions['db-explain'] = [
        'class' => 'yii\\mongodb\\debug\\ExplainAction',
        'panel' => $this,
    ];
}