heropoo/config

配置组件

v0.2.1 2019-03-15 10:06 UTC

This package is auto-updated.

Last update: 2024-09-17 09:40:41 UTC


README

配置组件

### 使用方法

通过Composer安装

composer require heropoo/config
<?php
require_once './Config.php';
require_once './Exception.php';

use Moon\Config\Config;

$config = new Config('/path/to/config/dir');

//if get charset in app.php return 
$charset = $config->get('app.charset');

// the second parameter is if throw a exception
// when this config is not defined
$charset = $config->get('app.charset', true);