library json-config
Yet Another JSON config for PHP
artox-lab/json-config
Yet Another JSON config for PHP
- Friday, August 21, 2015
- by artox-lab
- Repository
- 3 Watchers
- 2 Stars
- 4,395 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 6 Versions
- 2 % Grown
JSON Config
Installation via Composer
{
"require": {
"artox-lab/json-config": "1.3.1"
}
}
Run composer update
, (*1)
Config Definition
config.json, (*2)
{
"name": "Suppa Project",
"version": 1,
"rating": 2.5,
"authors": [
"code.god@gmail.com"
],
"emails": {
"subscription": [
"user1@gmail.com",
"user2@gmail.com"
],
"user": {
"name": "Johny"
},
"should_notify": true
}
}
Config Usage
index.php, (*3)
<?php
include 'vendor/autoload.php';
// Setup path to config file
JsonConfig\Config::setup('config.json');
// Get data from config
$subscriptions = JsonConfig\Config::get('emails.subscription');
dev-master
9999999-dev
Yet Another JSON config for PHP
Sources
Download
The Requires
The Development Requires
by
Ivanenko Dmitry
php
json
config
1.3.1
1.3.1.0
Yet Another JSON config for PHP
Sources
Download
The Requires
The Development Requires
by
Ivanenko Dmitry
php
json
config
1.3
1.3.0.0
Yet Another JSON config for PHP
Sources
Download
The Requires
The Development Requires
by
Ivanenko Dmitry
php
json
config
1.2
1.2.0.0
Yet Another JSON config for PHP
Sources
Download
The Requires
The Development Requires
by
Ivanenko Dmitry
php
json
config
1.1
1.1.0.0
Yet Another JSON config for PHP
Sources
Download
The Requires
The Development Requires
by
Ivanenko Dmitry
php
json
config