rimksky/config
Composer 安装命令:
composer require rimksky/config
包简介
Replacing defines in global scope with static class values.
README 文档
README
Overview
"php-config-class" is very simple libary for php. This library is assumed to be replacing "define" function with static class value. if using this, Config parameters in your application use like global variable, but not using global variable.
System Requirements
- PHP 5.4.0 or greater
- Composer
Installation
% php composer require rimksky/config
How to use
<?php
require_once( __DIR__."/vendor/autoload.php" );
use Rimksky\Util\Config;
// you can use in anywhere scope.
Config::getInstance()->your_param = "test"; // setting value
echo Config::getInstance()->your_param."\n"; // getting value
// alternative method
Config::i()->your_param2 = "test"; // setting value
echo Config::i()->your_param2."\n"; // getting value
Notice
Set value by Config::__set() magic method is not const value.
License
"php-config-class" is licensed under The MIT License (MIT).
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-08