Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crisu83/yii-configbuilder

Helper for building application configurations for the Yii PHP framework.
https://github.com/crisu83/yii-configbuilder

Last synced: 23 days ago
JSON representation

Helper for building application configurations for the Yii PHP framework.

Awesome Lists containing this project

README

        

yii-configbuilder
=================

Helper for building application configurations for the Yii PHP framework.

## Basic configuration

### Usage

To use the config builder you simply need to load it in your entry script:

```php
run();
```
***index.php***

## Environment specific configurations

If you need different environments in your application you can use the **buildForEnv** method together with the **EnvCommand** to easily set environment specific configurations.

### Configuration

Add the env command to your console config file (usually **protected/config/console.php**):

```php
// console application configuration
return array(
.....
'commandMap' => array(
'env' => array(
'class' => 'path.alias.to.EnvCommand',
// optional configurations
'runtimePath' => 'application.runtime', // the path to the application runtime folder
'envPaths' => array('application.config.environments'), // the paths to application environment configs
),
),
);
```
***console.php***

### Usage

Update your entry script (usually **index.php**) to use the **buildForEnv** method.

```php