Download the PHP package cube-group/myaf-utils without Composer
On this page you can find all versions of the php package cube-group/myaf-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package myaf-utils
util工具类集合
提供数组、字符串、地址解析等功能
namespace
工具类
类 | 功能 |
---|---|
Arrays | 提供数组常用操作 |
Strings | 提供字符串常用操作 |
URLUtil | URL地址处理工具类 |
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
- case2camel($string) - 小写下划线字符串转换为驼峰
- camel2case($string) 驼峰字符串转为小写下划线
- random($length = 16) 创建随机数
- uuid() - 生成维一id
- parseMultiValue($value, $func = '') - 折分字符串为多个值,支持中文逗号/英文逗号/空格
- isAssoc() - 判断是否是关联数组
- isMultidim() - 判断是否是多给数组
URLUtil
- toHttps() - 将url地址http改为https
- addParameter($url, $params) - 给URL地址追加get参数
- getParameters($url) - 根据URL地址获取query string
单元测试
-
1.安装单元测试依赖代码
- 2.执行单元测试(代码位于tests文件夹)
All versions of myaf-utils with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6
gregwar/image Version 2.0.22
gregwar/captcha Version 1.1.5
gregwar/cache Version 1.0.12
spomky-labs/otphp Version ^8.3.2
christian-riesen/otp Version 2.5.0
swiftmailer/swiftmailer Version 5.4.9
bacon/bacon-qr-code Version ^1.0.3
phpoffice/phpspreadsheet Version 1.2.0
gregwar/image Version 2.0.22
gregwar/captcha Version 1.1.5
gregwar/cache Version 1.0.12
spomky-labs/otphp Version ^8.3.2
christian-riesen/otp Version 2.5.0
swiftmailer/swiftmailer Version 5.4.9
bacon/bacon-qr-code Version ^1.0.3
phpoffice/phpspreadsheet Version 1.2.0
The package cube-group/myaf-utils contains the following files
Loading the files please wait ....