kigkonsult/keyvaluemgr 问题修复 & 功能扩展

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

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

kigkonsult/keyvaluemgr

Composer 安装命令:

composer require kigkonsult/keyvaluemgr

包简介

PHP class manage collection of key/value pair data like system config etc

README 文档

README

Manages collection of key/value pairs like system config etc

USAGE
<?php
namespace Kigkonsult\KeyValueMgr;

// set up some config

$key   = 'key';
$value = 'value;
$configDataArray = [ $key => $value ];

// set up KeyValueMgr

$cfgMgr = new KeyValueMgr();
$cfgMgr->set( $configDataArray );
$cfgMgr->set( 'key2', 'value2' );

// usage exists / get / remove

if( $cfgMgr->exists( $key ) {
   $value = $cfgMgr->get( $key );
}
$cfgMgr->remove( $key )
Methods

KeyValueMgr::__construct( [ configDataArray ] )

  • configDataArray array

KeyValueMgr::factory( [ configDataArray ] )

  • configDataArray array
  • static
  • Return static

KeyValueMgr::singleton( [ configDataArray ] )

  • configDataArray array
  • static
  • Return singleton KeyValueMgr

KeyValueMgr::exists( key )

  • key mixed
  • Return bool true on found

KeyValueMgr::exists( key, true )

  • key mixed
  • true bool true
  • Return bool true on found and value NOT is null, '' or []

KeyValueMgr::get()

  • Return array *( key => value )

KeyValueMgr::get( key )

  • key mixed
  • Return value for key, false on not found

KeyValueMgr::getKeys()

  • Return array *( key )

KeyValueMgr::set( key, value )

  • Insert key/value-pair (overwrite if key exists)
  • key string|int
  • value mixed
  • Return static

KeyValueMgr::set( key, value, true )

  • Insert key/value-pair if key is NOT set
  • key string|int
  • value mixed
  • true bool true
  • Return static

KeyValueMgr::set( configDataArray )

  • Insert array key/value-pairs (overwrite if key exists)
  • configDataArray array *( key => value )
  • Return static

KeyValueMgr::set( configDataArray, null, true )

  • Insert array key/value-pairs where key NOT exists
  • configDataArray array *( key => value )
  • true bool true
  • Return static

KeyValueMgr::remove( key )

  • Unset key/value pair
  • key string|int
  • Return static

KeyValueMgr::remove( keyArr )

  • Unset key/value pairs
  • keyArr array *( key )
  • Return static

KeyValueMgr::remove( keyToKeep, true )

  • Unset all OTHER key/value-pairs
  • keyToKeep string|int
  • true bool true
  • Return static

KeyValueMgr::remove( keyArrToKeep, true )

  • Unset all OTHER key/value-pairs
  • keyArrToKeep array *( key )
  • true bool true
  • Return static

KeyValueMgr::toString()

  • Return nice edited string content output
Sponsorship

Donation using paypal.me/kigkonsult are appreciated. For invoice, please e-mail.

INSTALL
composer require kigkonsult\keyvaluemgr:dev-master

Composer, in your composer.json:

{
    "require": {
        "kigkonsult\keyvaluemgr": "dev-master"
    }
}

KeyValueMgr 1.8 require PHP 8.0, 1.6 7.4, 1.4.1 7.0

Composer, acquire access

use Kigkonsult\KeyValueMgr\KeyValueMgr;
...
include 'vendor/autoload.php';

Otherwise , download and acquire..

use Kigkonsult\KeyValueMgr\KeyValueMgr;
...
include 'pathToSource/kigkonsult/keyvaluemgr/autoload.php';
Support

For support go to github.com KeyValueMgr

License

This project is licensed under the LGPLv3 License.

kigkonsult/keyvaluemgr 适用场景与选型建议

kigkonsult/keyvaluemgr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 03 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「configuration」 「group」 「value」 「collection」 「aggregation」 「key」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 kigkonsult/keyvaluemgr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 kigkonsult/keyvaluemgr 我们能提供哪些服务?
定制开发 / 二次开发

基于 kigkonsult/keyvaluemgr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: gpl-3.0
  • 更新时间: 2020-03-26