Download the PHP package geniusgeeek/pu-converter without Composer

On this page you can find all versions of the php package geniusgeeek/pu-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pu-converter

License build status

PU-converter

PU-converter is an easy to use PHP unit converter library for converting S.I units to other compatible unit types. With PU-converter you can easily convert any engineering unit to its different unit types, for example, kilogram to grams, celsius to kelvin, e.t.c. Save your self the math stress and let the PU-converter library handle all conversions for you.

Coverage

PU-converter allows you to convert any unit to any other compatible unit type.

It has no external dependencies, simply include the library in your project and you're set

PU-converter can handle a wide range of unit types including:

Installation

Using Composer

PU-converter can be insatlled using composer

without composer

To utilize this class, first import puconverter.php into your project, and instantiate it.

Guidelines: How to use

  1. Create an object of the class for conversion
  2. The object propeties should be initialised on object creation
  3. Parameter 1 is the class for conversion, Parameter 2 is the value to be converted, Parameter 3 is the unit to convert, Parameter 4 is the unit to be converted to
  4. To return the conversion call the method convert()
  5. All units are to be passed in their SI units/abbreviations, example: kilogram is kg, seconds is s, e.t.c.

Documentation

Create an object for different conversion class using the syntax below

  1. $temperature => new PUconverter("temperature", $value, $fromUnit, $toUnit);
  2. Area => new PUconverter("area", $value, $fromUnit, $toUnit);
  3. Plane Angles => new PUconverter("angle", $value, $fromUnit, $toUnit);
  4. Time => new PUconverter("time", $value, $fromUnit, $toUnit);
  5. Volume => new PUconverter("volume", $value, $fromUnit, $toUnit);
  6. Speed => new PUconverter("speed", $value, $fromUnit, $toUnit);
  7. Length => new PUconverter("length", $value, $fromUnit, $toUnit);
  8. Pressure => new PUconverter("pressure", $value, $fromUnit, $toUnit);
  9. Mass => new PUconverter("mass", $value, $fromUnit, $toUnit);
  10. Frequency => new PUconverter("frequency", $value, $fromUnit, $toUnit);
  11. Energy/Power => new PUconverter("energy", $value, $fromUnit, $toUnit);
  12. Disk Storage => new PUconverter("storage", $value, $fromUnit, $toUnit);

Simple Examples

//Returns 3000000 meters

//returns 52.143 weeks

Valid Units

Temperature
k => Kelvin
c => celsius
f => fahrenheit

Area
m2 => Square Meter
km2 => Square Kilometer
cm2 => Square Centimeter
mm2 => Square Millimeter
ft2 => Square Foot
mi2 => Square Mile
ac => Acre
ha => hectare

Volume
l => Litre
ml => Millilitre
m3 => Cubic Meter
gal => Gallon
oz => fluid ounces
ft3 => cubic feet
cm3 => cubic centi meter

Mass
kg => Kilogram
g => Gram
mg => Milligram
lb => Pound
t => Tonne

Speed
mps => Meters per Second
kph => Kilometers Per Hour
mph => Miles Per Hour
knots => Knots

Planes Angles
deg => Degrees
rad => Radian
grad => gradian

Pressure
pa => Pascal
kpa => kilopascal
mpa => MegaPascal
bar => Bar
mbar => Millibar
psi => Pound-force per square inch

Time
s => Second
yr => Year
month => Month
week => Week
day => Day
hr => Hour
min => Minute
ms => Millisecond
dec => decade
cen => century

Energy/Power
j => Joule
kj => Kilojoule
gcal => Gram calorie
whr => Watt Hour
kwhr => Kilowatt Hour
ev => Electronvolt
kcal => kilocalorie

Disk Storage
bit => bit
byte => byte
kb => kilobyte
mb => megabyte
gb => gigabyte
tb => terabyte
pb => petabyte

Frequency
hz => hertz
khz => kilo hertz
mhz => mega hertz
ghz => giga hertz

Length
m - Meter
km - Kilometer
cm - Centimeter
mm - Millimeter
um - Micrometer
nm - Nanometer
in - Inch
ft - Foot
yd - Yard
mi - Mile

Author

Initial work- Gracious Emmanuel

Contributors

Ordago: https://github.com/ordago

Contributing

Please, read the contributing.md to see contributing process, code of conduct and pull request process.


All versions of pu-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package geniusgeeek/pu-converter contains the following files

Loading the files please wait ....