Refactored app bootstrap logic.

This commit is contained in:
Qiang Xue
2014-04-10 15:05:01 -04:00
parent 567a2bf280
commit ea75177abc
7 changed files with 28 additions and 13 deletions

View File

@ -10,6 +10,7 @@ return [
'id' => 'app-backend',
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers',
'bootstrap' => ['log'],
'modules' => [],
'components' => [
'user' => [

View File

@ -9,6 +9,7 @@ $params = array_merge(
return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'console\controllers',
'modules' => [],
'components' => [

View File

@ -9,6 +9,7 @@ $params = array_merge(
return [
'id' => 'app-frontend',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'frontend\controllers',
'components' => [
'user' => [

View File

@ -8,6 +8,7 @@ $db = require(__DIR__ . '/db.php');
return [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'app\commands',
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
'components' => [

View File

@ -6,6 +6,7 @@ $db = require(__DIR__ . '/db.php');
$config = [
'id' => 'basic',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
'components' => [
'cache' => [