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. cube-group/myaf-utils

ActiveLibrary

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

utils

v1.0.0(7y ago)28.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 2d 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 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

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

2810d ago

Major Versions

v0.0.9 → v1.0.02018-09-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/93e719d708d4a6cc9f172360f51ca9ebf51e4fdb1461cd3a261cc1c3ff9dea27?d=identicon)[LincolnBruce](/maintainers/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.6k](/packages/craftcms-cms)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)[abydahana/aksara

Aksara is a CodeIgniter based CRUD Toolkit you can use to build complex applications become shorter, secure and more reliable just in a few lines of code. Serving both CMS or Framework, produce both HEADLESS (RESTful API) or TRADITIONAL (Browser Based), just by writing single controller. Yet it's reusable, scalable and ready to use!

1101.2k](/packages/abydahana-aksara)

PHPackages © 2026

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