Download the PHP package furthestworld/unitformat without Composer
On this page you can find all versions of the php package furthestworld/unitformat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download furthestworld/unitformat
More information about furthestworld/unitformat
Files in furthestworld/unitformat
Download furthestworld/unitformat
More information about furthestworld/unitformat
Files in furthestworld/unitformat
Vendor furthestworld
Package unitformat
Short Description 一个数据单位格式化的PHP组件
License MIT
Package unitformat
Short Description 一个数据单位格式化的PHP组件
License MIT
Keywords phpunitFormat
Please rate this library. Is it a good library?
Informations about the package unitformat
unitFormat
一个数据单位格式化的PHP组件
功能
提供数据的自动进位、格式化,并匹配单位
安装
- 在项目的composer.json文件中的require项中添加:
并更新composer依赖:composer update
- 在需要使用的地方添加:
用法
输出结果:
参数说明
formatDataUnit
方法
-
$origin_data :原始数据。可以是单个值,或者是一个数值数组列表
-
$mod :单位进位的模
-
$units :单位列表
- $number_format :使用PHP的number_format函数自定义参数数组,对应number_format的后三个参数列表
updateDataUnit
方法
-
$origin_data : 原始数据的引用。 直接对原始数据格式化修改
-
$key :需要格式化的数据数组 key
-
$mod :单位进位的模
-
$units :单位列表
- $number_format :使用PHP的number_format函数自定义参数数组,对应number_format的后三个参数列表
updateMultiDataUnit
: 直接对原始数据多组数据格式化修改
-
$origin_data : 原始数据的引用。
- $keys : 多个字段格式化设置数组
格式如下:
其他完善中。。。
All versions of unitformat with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.19
The package furthestworld/unitformat contains the following files
Loading the files please wait ....