定制 two-thirds/env-parser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

two-thirds/env-parser

Composer 安装命令:

composer require two-thirds/env-parser

包简介

README 文档

README

pipeline status coverage report

This is a simple library that extends vlucas/phpdotenv to parse an env file and return an array of values. It is designed to be completely isolated from the current environment by default. It will never export variables into the current environment. By default it will not import current environment variables for nested replacement, but there is an option to do so.

.env.test:

EXAMPLE="Hello World!"
NUMBER=123
WITH_SPACES="with spaces"
REPLACEMENT="the example variable says ${EXAMPLE}"
$variables = EnvParser::parse(realpath('.env.test'));
$variables === [
    'EXAMPLE' => 'Hello World!',
    'NUMBER' => '123',
    'WITH_SPACES' => 'with spaces',
    'REPLACEMENT' => 'the example variable says Hello World!',
];

Note: The returned values will always be strings. In certain frameworks like Laravel, conversion of "(false)" to false or "null" to null happens within the framework and is not the responsibility of this library or vlucas/phpdotenv

Versions

This library currently supports two versions of vlucas/phpdotenv

env-parser tagphpdotenv tag
2.2.x^2.2
3.3.x^3.3

This is primarily done to provide support for Laravel 5.3 and up, which at the time of writing this only used ^2.2 and ^3.3. If you encounter bugs, please be sure to report the exact version of phpdotenv that you're using so this can be adjusted accordingly.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固