2016-01-02 19:13:18 +05:30
|
|
|
<?php
|
|
|
|
$params = array_merge(
|
|
|
|
require(__DIR__ . '/../../common/config/params.php'),
|
|
|
|
require(__DIR__ . '/../../common/config/params-local.php'),
|
|
|
|
require(__DIR__ . '/params.php'),
|
|
|
|
require(__DIR__ . '/params-local.php')
|
|
|
|
);
|
|
|
|
|
|
|
|
return [
|
|
|
|
'id' => 'accounts-site-api',
|
|
|
|
'basePath' => dirname(__DIR__),
|
|
|
|
'bootstrap' => ['log'],
|
|
|
|
'controllerNamespace' => 'api\controllers',
|
|
|
|
'components' => [
|
|
|
|
'user' => [
|
2016-01-03 05:48:37 +05:30
|
|
|
'identityClass' => 'common\models\Account',
|
2016-01-02 19:13:18 +05:30
|
|
|
'enableAutoLogin' => true,
|
|
|
|
],
|
|
|
|
'log' => [
|
|
|
|
'traceLevel' => YII_DEBUG ? 3 : 0,
|
|
|
|
'targets' => [
|
|
|
|
[
|
|
|
|
'class' => 'yii\log\FileTarget',
|
|
|
|
'levels' => ['error', 'warning'],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'errorHandler' => [
|
|
|
|
'errorAction' => 'site/error',
|
|
|
|
],
|
2016-01-03 05:48:37 +05:30
|
|
|
'request' => [
|
|
|
|
'baseUrl' => '/api',
|
|
|
|
],
|
|
|
|
'urlManager' => [
|
|
|
|
'enablePrettyUrl' => true,
|
|
|
|
'showScriptName' => false,
|
|
|
|
'rules' => [],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'modules' => [
|
|
|
|
'login' => 'api\modules\login\Module',
|
2016-01-02 19:13:18 +05:30
|
|
|
],
|
|
|
|
'params' => $params,
|
|
|
|
];
|