rixxi/env 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

rixxi/env

Composer 安装命令:

composer require rixxi/env

包简介

README 文档

README

ENV variables in Nette DI configuration (nette, php and parameters sections excluded).

Install

composer require rixxi/env:~1.0 or @dev if you are mad.

Put extension at least before other extensions that use ENV variables in configuration.

Configure

By default only defined parameters are registered. If you want all environment variables be available then turn whitelist: off..

Example of kdyby/doctrine configuration

env:
	parameters:
		DB_HOST: 127.0.0.1
		DB_NAME:
		DB_DRIVER: pgsql
		DB_USERNAME:
		DB_PASSWORD:

doctrine:
	host: %env.DB_HOST%
	dbname: %env.DB_NAME%
	driver: pdo_%env.DB_DRIVER%
	username: %env.DB_USERNAME%
	password: %env.DB_PASSWORD%
	// ... other stuff

extensions:
	env: Rixxi\Env\DI\EnvExtension

When running application at least DB_NAME ENV must be set. You can do that directly via shell

DB_NAME=test php www/index.php

or in config of apache or fpm pool.

Limitations

  • Only other 3rd party extension configuration is supported that means no variables in nette or php.
  • Sections parameters and services are not supported. It is not possible at this time due to limitations of nette/di.
  • Only string names and scalar and null values are supported. This one is on purpose.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-07-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固