main.php 980 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?php
$rootDir = __DIR__ . '/../..';

$params = array_merge(
	require($rootDir . '/common/config/params.php'),
	require($rootDir . '/common/config/params-local.php'),
	require(__DIR__ . '/params.php'),
	require(__DIR__ . '/params-local.php')
);

return array(
Qiang Xue committed
12
	'id' => 'app-frontend',
13
	'basePath' => dirname(__DIR__),
14
	'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
15
	'preload' => array('log'),
16
	'controllerNamespace' => 'frontend\controllers',
17 18 19
	'modules' => array(
	),
	'components' => array(
20
		'db' => $params['components.db'],
21
		'cache' => $params['components.cache'],
22 23
		'user' => array(
			'class' => 'yii\web\User',
24
			'identityClass' => 'common\models\User',
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
		),
		'assetManager' => array(
			'bundles' => require(__DIR__ . '/assets.php'),
		),
		'log' => array(
			'class' => 'yii\logging\Router',
			'targets' => array(
				array(
					'class' => 'yii\logging\FileTarget',
					'levels' => array('error', 'warning'),
				),
			),
		),
	),
	'params' => $params,
);