Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/crisu83/yii-configbuilder
- Owner: crisu83
- Created: 2013-02-19T21:39:48.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-27T21:39:49.000Z (almost 12 years ago)
- Last Synced: 2025-01-01T21:32:54.686Z (about 1 month ago)
- Language: PHP
- Size: 156 KB
- Stars: 12
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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