Browse Source

Convert to short syntax

tags/2.0.0-beta
sensorario 11 years ago
parent
commit
249493985d
  1. 12
      apps/basic/config/AppAsset.php
  2. 30
      apps/basic/config/console.php
  3. 4
      apps/basic/config/params.php
  4. 38
      apps/basic/config/web.php

12
apps/basic/config/AppAsset.php

@ -17,13 +17,13 @@ class AppAsset extends AssetBundle
{ {
public $basePath = '@webroot'; public $basePath = '@webroot';
public $baseUrl = '@web'; public $baseUrl = '@web';
public $css = array( public $css = [
'css/site.css', 'css/site.css',
); ];
public $js = array( public $js = [
); ];
public $depends = array( public $depends = [
'yii\web\YiiAsset', 'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset', 'yii\bootstrap\BootstrapAsset',
); ];
} }

30
apps/basic/config/console.php

@ -1,25 +1,25 @@
<?php <?php
$params = require(__DIR__ . '/params.php'); $params = require(__DIR__ . '/params.php');
return array( return [
'id' => 'bootstrap-console', 'id' => 'bootstrap-console',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'preload' => array('log'), 'preload' => array('log'),
'controllerPath' => dirname(__DIR__) . '/commands', 'controllerPath' => dirname(__DIR__) . '/commands',
'controllerNamespace' => 'app\commands', 'controllerNamespace' => 'app\commands',
'modules' => array( 'modules' => [
), ],
'components' => array( 'components' => [
'cache' => array( 'cache' => [
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
), ],
'log' => array( 'log' => [
'targets' => array( 'targets' => [
array( [
'class' => 'yii\log\FileTarget', 'class' => 'yii\log\FileTarget',
'levels' => array('error', 'warning'), 'levels' => ['error', 'warning'],
), ],
), ],
), ],
), ],
'params' => $params, 'params' => $params,
); ];

4
apps/basic/config/params.php

@ -1,5 +1,5 @@
<?php <?php
return array( return [
'adminEmail' => 'admin@example.com', 'adminEmail' => 'admin@example.com',
); ];

38
apps/basic/config/web.php

@ -1,33 +1,33 @@
<?php <?php
$params = require(__DIR__ . '/params.php'); $params = require(__DIR__ . '/params.php');
$config = array( $config = [
'id' => 'bootstrap', 'id' => 'bootstrap',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'components' => array( 'components' => [
'request' => array( 'request' => [
'enableCsrfValidation' => true, 'enableCsrfValidation' => true,
), ],
'cache' => array( 'cache' => [
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
), ],
'user' => array( 'user' => [
'identityClass' => 'app\models\User', 'identityClass' => 'app\models\User',
), ],
'errorHandler' => array( 'errorHandler' => [
'errorAction' => 'site/error', 'errorAction' => 'site/error',
), ],
'log' => array( 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0, 'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => array( 'targets' => [
array( [
'class' => 'yii\log\FileTarget', 'class' => 'yii\log\FileTarget',
'levels' => array('error', 'warning'), 'levels' => ['error', 'warning'],
), ],
), ],
), ],
), ],
'params' => $params, 'params' => $params,
); ];
if (YII_ENV_DEV) { if (YII_ENV_DEV) {
$config['preload'][] = 'debug'; $config['preload'][] = 'debug';

Loading…
Cancel
Save