allmarkedup/conph 问题修复 & 功能扩展

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

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

allmarkedup/conph

最新稳定版本:v0.2.1

Composer 安装命令:

composer require allmarkedup/conph

包简介

Configuration handler class.

README 文档

README

A little configuration class for PHP 5.4+.

Work In Progress. You have been warned.

Installation and use

Using composer:

$ composer require allmarkedup/conph

Example

<?php

class MyConfig extends Amu\Conph\Config
{
    public function convertPaths($value)
    {
        return array_map(function($item){
            return '/my/base/path' . $item;
        }, $value);
    }
}

$config = new MyConfig([
    "paths" => [
        "templates" => "the_template_path",
        "config" => "the_config_path"
    ],
    "settings" => [
        "debug" => true
    ],
    'names' => [
        "batman" => 'Fred',
        "superman" => 'Dave'
    ]
]);

// Nested values - dot notation
$debug = $config->get('settings.debug');
$config->set('names.batman', 'Clive');

// Custom converter functions
$config->get('paths.templates'); // => /my/base/path/the_template_path

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固