jizuscreed/callbackable-array-functions
Composer 安装命令:
composer require jizuscreed/callbackable-array-functions
包简介
Some wrappers for php array functions, which provides callback-ability to them
README 文档
README
Some wrappers for php array functions, which provides callback-ability to them
Advantages
It is not another implementation of core same-named functions. Packet internally uses php core same-named functions (all magic from Decorators), so you can be sure, that callbackable function will work totally like same core function of your php version
Implemented functions
- array_unique
Installation
Use composer:
composer require jizuscreed/callbackable-array-functions
Using
<?php
use jizuscreed\CallbackableArrayFunctions\ArrayUnique;
// array of objects or another multidimensional arrays
$array = [...];
$array = ArrayUnique::run($array, function($arrayValue){
// some logic, that returns string representation of one array value. Be carefull with it because array elements will be checked for differences by result of this callback
return $arrayValue->title;
});
License
MIT, so feel free to do whatever you want with this code
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-10