new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php namespace ZN\Shopping;
|
||||
/**
|
||||
* ZN PHP Web Framework
|
||||
*
|
||||
* "Simplicity is the ultimate sophistication." ~ Da Vinci
|
||||
*
|
||||
* @package ZN
|
||||
* @license MIT [http://opensource.org/licenses/MIT]
|
||||
* @author Ozan UYKUN [ozan@znframework.com]
|
||||
*/
|
||||
|
||||
use ZN\Helpers\Converter;
|
||||
|
||||
class Money
|
||||
{
|
||||
/**
|
||||
* Format money
|
||||
*
|
||||
* @param int $money
|
||||
* @param string $type = NULL
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function format(int $money, ?string $type = NULL) : string
|
||||
{
|
||||
return Converter::money($money, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Money to number
|
||||
*
|
||||
* @param string $money
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function number($money) : Float
|
||||
{
|
||||
return Converter::moneyToNumber($money);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user