braunstetter/helper
最新稳定版本:v0.2.5
Composer 安装命令:
composer require braunstetter/helper
包简介
Just a package for php helper classes.
README 文档
README
A bundle for sharing usefully stuff around several projects.
Installation
composer require braunstetter/helper
Array
attachClass
This method is just handy when it comes to add a class to an existing class string.
Braunstetter\Helper\Arr::attachClass([ 'class' => 'mx-4 my-2' ], 'container') # output: # ['class' => 'mx-4 my-2 container']
attach
Sometimes just want to add some new attribute to an existing string.
Braunstetter\Helper\Arr::attach( [ 'data-controller' => 'example'], [ 'data-controller' => 'another-example'] ) # output: # ['data-controller' => 'example another-example']
firstValue
Returns the first value of a given array. If the array is empty it returns null.
Braunstetter\Helper\Arr::firstValue([ 3 => 'first', 2 => 'second', 0 => 'third' ]) # output: # first
统计信息
- 总下载量: 1.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-07