Files
2026-07-01 16:44:17 +03:00

41 lines
761 B
PHP

<?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);
}
}