Esempio n. 1
0
<?php

return ['vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'timeZone' => 'Asia/Almaty', 'language' => 'ru-RU', 'modules' => ['users' => ['class' => 'vova07\\users\\Module', 'robotEmail' => '*****@*****.**', 'robotName' => 'Robot'], 'blogs' => ['class' => 'vova07\\blogs\\Module'], 'comments' => ['class' => 'vova07\\comments\\Module'], 'attachments' => ['class' => nemmo\attachments\Module::className(), 'tempPath' => '@statics/web/attachments/temp', 'storePath' => '@statics/web/attachments/store', 'rules' => ['maxFiles' => 10, 'mimeTypes' => ['image/png', 'image/jpeg'], 'maxSize' => 1024 * 1024], 'tableName' => '{{%attachments}}']], 'components' => ['user' => ['class' => 'yii\\web\\User', 'identityClass' => 'vova07\\users\\models\\User', 'loginUrl' => ['/users/guest/login']], 'cache' => ['class' => 'yii\\caching\\FileCache', 'cachePath' => '@root/cache', 'keyPrefix' => 'yii2start'], 'urlManager' => ['enablePrettyUrl' => true, 'enableStrictParsing' => true, 'showScriptName' => false, 'suffix' => '/'], 'assetManager' => ['linkAssets' => true], 'authManager' => ['class' => 'yii\\rbac\\DbManager', 'defaultRoles' => ['user'], 'itemTable' => 'auth_item', 'itemChildTable' => 'auth_item_child', 'assignmentTable' => 'auth_assignment', 'ruleTable' => 'auth_rule'], 'formatter' => ['dateFormat' => 'dd.MM.y', 'datetimeFormat' => 'HH:mm:ss dd.MM.y'], 'db' => require __DIR__ . '/db.php'], 'params' => require __DIR__ . '/params.php'];
Esempio n. 2
0
<?php

$params = (require __DIR__ . '/params.php');
$config = ['id' => 'app-practical-b', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => ['request' => ['cookieValidationKey' => 'MyuEp5JymPDNWBMRX26AN0JqBNGDooNv'], 'cache' => ['class' => 'yii\\caching\\FileCache'], 'errorHandler' => ['errorAction' => 'site/error'], 'mailer' => ['class' => 'yii\\swiftmailer\\Mailer', 'useFileTransport' => true], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'db' => require __DIR__ . '/db.php', 'urlManager' => ['enablePrettyUrl' => true, 'showScriptName' => false], 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '']], 'modules' => ['user' => ['class' => 'dektrium\\user\\Module', 'enableUnconfirmedLogin' => true, 'confirmWithin' => 21600, 'cost' => 12, 'admins' => ['admin', 'jim']], 'attachments' => ['class' => nemmo\attachments\Module::className(), 'tempPath' => '@app/uploads/temp', 'storePath' => '@app/uploads/images', 'rules' => ['maxFiles' => 3, 'mimeTypes' => 'image/jpeg', 'maxSize' => 1024 * 1024 * 4]]], 'params' => $params];
if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\\debug\\Module';
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\\gii\\Module';
}
return $config;