定制 gorka/dot-notation-access 二次开发

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

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

gorka/dot-notation-access

最新稳定版本:v1.0.0

Composer 安装命令:

composer require gorka/dot-notation-access

包简介

Dot notation access arrays

README 文档

README

⚠️ This project is unmaintained and might eventually be removed. Use it at your own risk.

Dot notation accessor & dot notation access array

Simple dot notation access for PHP arrays

Build Status Code Coverage

Example

<?php use Gorka\DotNotationAccess\DotNotationAccessArray; $mongoConnection = [ 'mongo' => [ 'default' => [ 'user' => 'username', 'password' => 's3cr3t' ] ] ]; $config = new DotNotationAccessArray($mongoConnection); // Get plain value $user = $config->get('mongo.default.user'); /* $user = 'username'; */ // Get array value $mongoDefault = $config->get('mongo.default'); /* $mongoDefault = ['user' => 'username', 'password' => 's3cr3t']; */ // Overwrite values $overwrite = [ 'mongo' => [ 'default' => [ 'user' => 'myuser', 'server' => 'localhost' ], 'numbers' => [1, 1, 2, 3, 5, 8, 13] ], 'title' => 'Dot Notation' ]; $config = $config->merge($overwrite); $configDump = $config->getAll(); /* $configDump = [ 'mongo' => [ 'default' => [ 'user' => 'myuser', 'password' => 's3cr3t', 'server' => 'localhost', ], 'numbers' => [1, 1, 2, 3, 5, 8, 13] ], 'title' => 'Dot Notation' ]; */ // Remove value $config = $config->remove('mongo.default'); $configDump = $config->getAll(); /* $configDump = [ 'mongo' => [ 'numbers' => [1, 1, 2, 3, 5, 8, 13] ], 'title' => 'Dot Notation' ]; */ // Set values $config = $config->set('mongo.numbers', [2, 3, 5, 7, 11]); $configDump = $config->getAll(); /* $configDump = [ 'mongo' => [ 'numbers' => [2, 3, 5, 7, 11] ], 'title' => 'Dot Notation' ]; */ 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固