定制 ahir/environment 二次开发

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

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

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 hostname command.

.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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-04