Skip to content

A simple php library to generate and convert degree numbers. It's also compatible with fzaninotto/Faker.

License

Notifications You must be signed in to change notification settings

tamperdata/exiges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exiges

A simple php library to generate and convert degree numbers. It's also compatible with fzaninotto/Faker.

Total Downloads Latest Stable Version Build Status

Installing

The package installation can be done with composer by the following command:

composer require tamperdata/exiges

Exiges does not provides Facades or ServiceProviders, they aren't needed.

Usage

1 - Conversor

use Tamperdata\Exiges\Conversor;

$conversor = new Conversor;

$num = 100;

$result1 = $conversor->celsiusToFahrenheit($num);

$result2 = $conversor->celsiusToKelvin($num);

$result3 = $conversor->fahrenheitToCelsius($num);

$result4 = $conversor->fahrenheitToKelvin($num);

$result5 = $conversor->kelvinToCelsius($num);

$result6 = $conversor->kelvinToFahrenheit($num);

2 - Generator

use Tamperdata\Exiges\Generator;

$generator = new Generator;

$degree = 'C';
$num1   = 10;
$num2   = 50;

$result = $generator->temperatureForHumans($degree, $num1, $num2);

3 - Faker

You can also use it with the fantastic Faker library! (It's actually what its designed for)

https://github.com/fzaninotto/Faker

$faker     = \Faker\Factory::create();

$conversor = new \Tamperdata\Exiges\Conversor();
$generator = new \Tamperdata\Exiges\Generator();

$faker->addProvider($generator);
$faker->addProvider($conversor);

$faker->temperatureForHumans('C', -10, 50);
$faker->celsiusToFahrenheit(10);

License

Exiges library is licensed under [The MIT License (MIT)] (https://github.com/tamperdata/exiges/blob/master/LICENSE)(LICENSE).

About

A simple php library to generate and convert degree numbers. It's also compatible with fzaninotto/Faker.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages