ahir/environment
最新稳定版本:1.3.1
Composer 安装命令:
composer require ahir/environment
包简介
Simple PHP environment manager.
关键字:
README 文档
README
This is a environment library for quick environment setup.
Installation
To install through composer, simply put the following in your composer.json file:
{
"require": {
"ahir/environment": "1.*",
}
}
Usage
index.php
$environment = new Ahir\Environment\Environment; $environment->path('/') ->detectEnvironment([ 'local' => ['your-machine-name'] ]);
index.php
$environment = new Ahir\Environment\Environment; $environment->file('/home/') ->detectEnvironment([ 'local' => ['your-machine-name'] ]);
You can check your machine name with
hostnamecommand.
.env.local.php
return [ 'secret-password' => 'secret-password-value' ];
.env.local.json
{
"environment": "development"
}
$secret = getenv('secret-password');
Facades
If you wish, you can use environment library with facade connector. Please visit for guideline. ahir/facades
License
MIT
统计信息
- 总下载量: 165
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-04