定制 kennisnet/symfony-env-loader 二次开发

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

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

kennisnet/symfony-env-loader

最新稳定版本:1.0.10

Composer 安装命令:

composer require kennisnet/symfony-env-loader

包简介

Loads the envs variables tier based

README 文档

README

This package let's you load env files on a tier based setup. You can have the following files depending on you environments:

.env .env.dist .env.dev .env.test .env.staging .env.production .env.local

The .env.local should have at least a APP_ENV=dev file in order for the package to fetch the correct dev env file for you local development environment.

Furthermore you have to create a bootstrap.php file in your config folder in order to call the EnvironmentVars class. And put this in your bootstrap.php:

require dirname(__DIR__).'/vendor/autoload.php';

use Kennisnet\DTO\AppEnv;
use Kennisnet\Env\EnvironmentVars;

$basePath = dirname(__DIR__);
EnvironmentVars::setAppEnvClassName(AppEnv::class);
EnvironmentVars::loadEnv($basePath);

Lastly replace the autoload.php line with bootstrap.php in your public/index.php file Here is a example:

public/index.php require dirname(__DIR__).'/config/bootstrap.php';

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固