diff --git a/src/config/hisite.php b/src/config/hisite.php index f149e26..d088ab9 100644 --- a/src/config/hisite.php +++ b/src/config/hisite.php @@ -10,12 +10,12 @@ return [ 'modules' => array_filter([ - 'debug' => defined('YII_DEBUG') && YII_DEBUG ? [ + 'debug' => empty($params['debug.enabled']) ? null : [ 'panels' => [ 'hiart' => [ - 'class' => \hiqdev\hiart\DebugPanel::class, + 'class' => \hiqdev\hiart\debug\DebugPanel::class, ], ], - ] : null, + ], ]), ]; diff --git a/src/DebugAction.php b/src/debug/DebugAction.php similarity index 98% rename from src/DebugAction.php rename to src/debug/DebugAction.php index 6a0f122..174d09b 100644 --- a/src/DebugAction.php +++ b/src/debug/DebugAction.php @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/) */ -namespace hiqdev\hiart; +namespace hiqdev\hiart\debug; use Yii; use yii\base\Action; diff --git a/src/DebugPanel.php b/src/debug/DebugPanel.php similarity index 99% rename from src/DebugPanel.php rename to src/debug/DebugPanel.php index 65431f1..94dfb5e 100644 --- a/src/DebugPanel.php +++ b/src/debug/DebugPanel.php @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/) */ -namespace hiqdev\hiart; +namespace hiqdev\hiart\debug; use Yii; use yii\debug\Panel; @@ -29,7 +29,7 @@ class DebugPanel extends Panel public function init() { $this->actions['hiart-query'] = [ - 'class' => 'hiqdev\\hiart\\DebugAction', + 'class' => DebugAction::class, 'panel' => $this, 'db' => $this->db, ];