+
Skip to content

teodoroleckie/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config PHP

Latest Version on Packagist Scrutinizer Code Quality Total Downloads Code Intelligence Status Build Status

Installation

You can install the package via composer:

composer require tleckie/config

Usage

<?php

use Tleckie\Config\Config;

$data = [
    'user' => [
        'name' => 'John',
        'age' => 38,
        'friend' => [
            'name' => 'Mario',
            'age' => 25,
            'friend' => [
                'name' => 'Pedro',
                'age' => 48,
            ]
        ]
    ],
    'size' => '800x900'
];
$config = new Config($data);

var_dump($config->get('user')->get('friend')->get('friend')->get('name'));
var_dump($config->user->friend->friend->name);

$config->merge(['name' => 'Pedro']);
$config->merge(new Config(['name' => 'Pedro']));

About

⚡ Config is a lightweight configuration file loader. PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载