2amigos/yiinitializr — pull request #16 by Borales (2013-08-17 01:38:20+00:00)
Title: Adding settings customization (#11)

@tonydspaniard @Ragazzo
With this PR, we can modify yiinitializr-settings. Sample of [config](https://github.com/2amigos/yiinitializr/blob/master/config/settings.php) can be like the following:

```
$dirname = dirname(__FILE__);
$app = $dirname . '/../../..';
$root = $app . '/..';

return array(
'custom' => array(
'path' => $app . '/config/settings.php',
),
'yii' => array(
'path' => $app . '/lib/vendor/yiisoft/yii/framework'
),
'yiinitializr' => array(
'config' => array(
'console' => $dirname . '/console.php'
),
'app' => array(
'root' => $root,
'directories' => array(
'config' => array(
'main' => $app . '/config',
'console' => $app . '/config',
'test' => $app . '/config'
),
'runtime' => array(
$app
),
'assets' => array(
$root . '/www'
)
),
'classes' => array(
'frontend' => array('\Yii', 'createWebApplication'),
)
),
)
);
```

Custom config (sets in `custom` section) will be merged with the base config. Sample of such config can be like the following:
```
return array(
'yiinitializr' => array(
'app' => array(
'directories' => array(
'config' => array(
'api' => $root . '/api/config',
),
'runtime' => array(
'api' => $root . '/api'
),
),
'classes' => array(
'api' => array('\MyYii', 'apiApplication'),
)
)
)
);
```