small/env
最新稳定版本:1.0.0
Composer 安装命令:
composer require small/env
包简介
small-env is a class to manage env vars for from scratch projects
README 文档
README
About
This project intend to manage env vars from system or dot env files
Install
Require the package with composer:
composer require small/env
Usage
Get a env var
$env = new \Small\Env\Env();
$env->get('test');
Note that if var not loaded in class, it will ask system for value and store result in class
Parse a dot env file
$env = new \Small\Env\Env();
$env->parseFile(__DIR__ . '/.env');
echo $env->get('MY_VAR');
Force value from system env var
$env = new \Small\Env\Env();
$env->parseFile(__DIR__ . '/.env');
$env->grabFromSystem('MY_VAR');
echo $env->get('MY_VAR');
test
To run unit tests, use :
$ bin/test --build
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-02-23