定制 samrap/gestalt 二次开发

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

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

samrap/gestalt

最新稳定版本:v0.3.1

Composer 安装命令:

composer require samrap/gestalt

包简介

Gestalt is a simple, elegant PHP package for managing your framework's configuration values.

README 文档

README

StyleCI Build Status Latest Stable Version Total Downloads Latest Unstable Version

ge·stalt (n): Something that is made of many parts and yet is somehow more than or different from the combination of its parts; broadly : the general quality or character of something.

Gestalt is a simple and elegant PHP package for managing your framework's configuration values. It is lightweight, flexible, framework agnostic, and has no dependencies other than PHP itself.

Features

  • Lightweight: Gestalt is built to be lightweight. No dependencies, no bloat, just an object-oriented wrapper around your framework's configuration.
  • Powerful: Who said lightweight means powerless? Gestalt has a small footprint but packs a mean punch. Just take a look at its Custom Loaders and Observers and you'll see for yourself.
  • Flexible: Developers like to do things our way. Gestalt gives you the flexibility to integrate seamlessly with your application.
  • Expressive syntax: With its clean, collection-like syntax, code artisans will feel right at home. Messy developers will like it too!

Examples

The following are just a few of the features Gestalt has to offer. Visit the docs for more on installation, usage, and features.

Basic Usage (Learn More)

$config = new Configuration([
    'app' => [
        'debug' => true,
        'version' => '1.0',
    ],
]);

// Get values using dot notation or ArrayAccess.
$config->get('app.debug');
$config['app'];

// Add values using dot notation or ArrayAccess.
$config->add('app.locale', 'en');
$config['mail'] = ['driver' => 'MailMonkey'];

Custom Loading (Learn More)

$config = Configuration::load(new JsonFileLoader);

$config->get('app.debug');

Observers (Learn More)

$config = new Configuration($values);

$config->attach(new StatefulObserver);

// Notifies the StatefulObserver that the
// Configuration has been updated.
$config->set('app.debug', false);

Interested? Check out the docs to see all of the features in action!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-03