PHPackages                             cube-group/myaf-utils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cube-group/myaf-utils

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cube-group/myaf-utils
=====================

utils

v1.0.0(7y ago)18.2k3MITPHPPHP &gt;=5.6

Since May 5Pushed 7y ago2 watchersCompare

[ Source](https://github.com/cube-group/myaf-utils)[ Packagist](https://packagist.org/packages/cube-group/myaf-utils)[ RSS](/packages/cube-group-myaf-utils/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (8)Versions (11)Used By (3)

util工具类集合
=========

[](#util工具类集合)

[![Latest Stable Version](https://camo.githubusercontent.com/a9c6f9d5e9dfaa4896f9f0c06351b12d485e36085b1b51cf1db94615d29890d3/68747470733a2f2f706f7365722e707567782e6f72672f637562652d67726f75702f6d7961662d7574696c732f76657273696f6e)](https://packagist.org/packages/cube-group/myaf-utils)[![Total Downloads](https://camo.githubusercontent.com/3861c2a94bbb5cd76eb2507b3bf8c7a19962af3d6947933af5e2cbaa881f2903/68747470733a2f2f706f7365722e707567782e6f72672f637562652d67726f75702f6d7961662d7574696c732f646f776e6c6f616473)](https://packagist.org/packages/cube-group/myaf-utils)[![License](https://camo.githubusercontent.com/13b04f53b69e5c8c8b0caf16d82ed28a464be2beceec21e63edff84accd65bde/68747470733a2f2f706f7365722e707567782e6f72672f637562652d67726f75702f6d7961662d7574696c732f6c6963656e7365)](https://packagist.org/packages/cube-group/myaf-utils)

提供数组、字符串、地址解析等功能

namespace
---------

[](#namespace)

```
"Myaf\\Utils\\": "src/"

```

工具类
---

[](#工具类)

类功能Arrays提供数组常用操作Strings提供字符串常用操作URLUtilURL地址处理工具类Arrays
------

[](#arrays)

- get($array, $key, $default = null) - 根据给定的key获取数组中的值，如果key的值不存在，将返回default定义的默认值
- sGet($array, $key, $default = null) - 根据给定的key获取数组中的值，如果key的值为空，将返回default定义的默认值
- lists($array, $key) - 根据key重建数组索引
- merge($a, $b) - 递归合并两个或多个数组
- keyToCamel($array) - 递归将数组的键转为驼峰
- keyToCase($array) - 递归将数组的键转为小写下划线
- removeKeys($array, $removeKeys) - 递归移除数组指定的key

Strings
-------

[](#strings)

- case2camel($string) - 小写下划线字符串转换为驼峰
- camel2case($string) 驼峰字符串转为小写下划线
- random($length = 16) 创建随机数
- uuid() - 生成维一id
- parseMultiValue($value, $func = '') - 折分字符串为多个值,支持中文逗号/英文逗号/空格
- isAssoc() - 判断是否是关联数组
- isMultidim() - 判断是否是多给数组

URLUtil
-------

[](#urlutil)

- toHttps() - 将url地址http改为https
- addParameter($url, $params) - 给URL地址追加get参数
- getParameters($url) - 根据URL地址获取query string

单元测试
----

[](#单元测试)

- 1.安装单元测试依赖代码

```
composer require phpunit/phpunit

```

- 2.执行单元测试(代码位于tests文件夹)

```
phpunit

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~24 days

Total

10

Last Release

2857d ago

Major Versions

v0.0.9 → v1.0.02018-09-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7814560?v=4)[linyang](/maintainers/LincolnBruce)[@LincolnBruce](https://github.com/LincolnBruce)

---

Top Contributors

[![LincolnBruce](https://avatars.githubusercontent.com/u/7814560?v=4)](https://github.com/LincolnBruce "LincolnBruce (17 commits)")

---

Tags

base

### Embed Badge

![Health badge](/badges/cube-group-myaf-utils/health.svg)

```
[![Health](https://phpackages.com/badges/cube-group-myaf-utils/health.svg)](https://phpackages.com/packages/cube-group-myaf-utils)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k16](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46823.2k3](/packages/pimcore-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
