定制 phico/config 二次开发

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

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

phico/config

Composer 安装命令:

composer require phico/config

包简介

Lightweight config file reader for Phico

README 文档

README

Lightweight config support Phico

Installation

Using composer

composer require phico/config

Usage

Create a config file

// /config/apis.php

return [
    'example' => [
        'url' => 'https://api.example.com',
        'secret' => 'top-secret'
    ]
];

Fetch a defined value

echo config()->get('apis.example.secret');
//  top-secret

Return a default value if the config is missing

echo config()->get('apis.example.missing', 'abc-123');
//  abc-123

Issues

Config is considered feature complete, however if you discover any bugs or issues in it's behaviour or performance please create an issue, and if you are able a pull request with a fix.

Please make sure to update tests as appropriate.

For major changes, please open an issue first to discuss what you would like to change.

License

BSD-3-Clause

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-06-23