kartik\helpers\Enum::numToWords PHP 메소드

numToWords() 공개 정적인 메소드

Example: ~~~ echo Enum::numToWords(21909); returns: twenty one thousand nine hundred and nine ~~~
public static numToWords ( double $num ) : string
$num double the source number
리턴 string
    public static function numToWords($num)
    {
        $num = (int) $num;
        // make sure it's an integer
        if ($num < 0) {
            return Yii::t('kvenum', 'minus') . ' ' . static::convertTri(-$num, 0);
        }
        if ($num == 0) {
            return Yii::t('kvenum', 'zero');
        }
        return static::convertTri($num, 0);
    }