org_heigl/converter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

org_heigl/converter

Composer 安装命令:

composer require org_heigl/converter

包简介

Convert from and to almost anything

README 文档

README

=========
Converter
=========

Converter is a PHP library that allows easy conversion between different 
metrics of a kind. 

Conversion between meter and millimeter might be easy and can be implemented 
over and over again, but what about the conversion from millimeter to
nautical miles? Or what about converting latitude/longitude to UTM? Or what
about converting degree Farenheit to Kelvin?

The answer is easy: Use this Converter

Requirements
------------

* PHP in version 5.3
* Nothing else

Installation
------------

* Put the Converter-Folder wherever you like and include that location into your
  include path.
* If you do not use an autoloader, you should do so!

Usage
-----
Have a look at this example-code to convert from Nautical Miles to yards.

::

  $miles      = 12;
  $from       = new \Converter\Length\NauticalMiles();
  $to         = new \Converter\Length\Yard();
  $miles2Yard = \Converter\Converter::factory($from, $to);
  
  echo $miles2Yard->convert($miles);
  // 24304.461942257
  
So a once defined Converter-Object can be reused as often as you like. 

How does it work
----------------

Clearly by magic. everything else would not be sophisticated enough.....

For those of you that do not believe in magic, the explanation is quite simple.
Converter uses an internal measure to and from which everything is converted.

So in the previous example the Converter calls Length\NauticalMiles to convert
the input to the internal measure and hands that over to Length\BritishYard to
convert the internal measure to british yards.

Normaly the internal measure is one of the international standard measurements
so for lengths the internal measure is meter.

For an overview have a look at the following list:

:Length: meter
:Area: squaremeter
:Volume: cubicmeter
:Geographical: Latitude/Longitude/Height above NN
:Temperature: Kelvin
:Color: CIELAB

统计信息

  • 总下载量: 2.27k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固