Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/burningtree/kohana-config-yaml
Kohana 3.x (KO3) YAML Config Driver
https://github.com/burningtree/kohana-config-yaml
Last synced: 5 days ago
JSON representation
Kohana 3.x (KO3) YAML Config Driver
- Host: GitHub
- URL: https://github.com/burningtree/kohana-config-yaml
- Owner: burningtree
- Created: 2010-10-23T04:48:28.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-02-24T19:58:32.000Z (over 13 years ago)
- Last Synced: 2023-03-12T01:47:36.624Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kohana 3.x YAML Config Driver
## Requirements & Installation
1. Install YAML PECL extension: [http://pecl.php.net/package/yaml](http://pecl.php.net/package/yaml)
2. Download or clone this repository to your Kohana modules directory or add git submodule:git submodule add git://github.com/burningtree/kohana-config-yaml.git modules/config-yaml
git submodule init3. Enable the module in your `bootstrap.php` file
## Example YAML file
`application/config/example.yaml`
some_key: some_value
another_key:
bars: [ bar1, bar2, bar3 ]
text: |
My text is line
wrapped!
items:
- id: 1
name: item 1
- id: 2
name: item 2## Example Usage
Kohana::config('example.another_key.bars.1'); // => "bar2"
or access to config as object:
Kohana::config('example')->another_key['bars'][1]; // => "bar2"