artox-lab/json-config

There is no license information available for the latest version (1.5.1) of this package.

Yet Another JSON config for PHP

Package info

github.com/artox-lab/json-config

pkg:composer/artox-lab/json-config

Statistics

Installs: 8 708

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.5.1 2021-01-19 15:56 UTC

Requires

  • php: >=7.1

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 5a5f4b3c39c1f001183ab5bf94dab7d5ce216405

  • Ivanenko Dmitry <id.noxt.woop@gmail.com>

phpjsonconfig

This package is not auto-updated.

Last update: 2026-06-17 18:04:53 UTC


README

Installation via Composer

{
 "require": {
 "artox-lab/json-config": "1.3.1"
 }
}

Run composer update

Config Definition

config.json

{
 "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

<?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');