Class craft\helpers\Number
- Inheritance
- craft\helpers\Number
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/helpers/Number.php
Class Number
Method | Description | Defined By |
---|---|---|
lowerAlpha() |
Returns the lowercase alphabetic version of a number | craft\helpers\Number |
lowerRoman() |
Returns the lowercase roman numeral version of a number | craft\helpers\Number |
makeNumeric() |
Returns the numeric value of a variable. | craft\helpers\Number |
upperAlpha() |
Returns the uppercase alphabetic version of a number | craft\helpers\Number |
upperRoman() |
Returns the uppercase roman numeral version of a number | craft\helpers\Number |
word() |
Returns the "word" version of a number | craft\helpers\Number |
Method Details
lowerAlpha()
public static method
#
Returns the lowercase alphabetic version of a number
public static string lowerAlpha ( \craft\helpers\int $num )
$num |
integer | The number |
return | string | The alphabetic version of the number |
---|
lowerRoman()
public static method
#
Returns the lowercase roman numeral version of a number
public static string lowerRoman ( \craft\helpers\int $num )
$num |
integer | The number |
return | string | The roman numeral version of the number |
---|
makeNumeric()
public static method
#
Returns the numeric value of a variable.
If the variable is an object with a __toString() method, the numeric value of its string representation will be returned.
public static mixed makeNumeric ( $var )
$var |
mixed |
upperAlpha()
public static method
#
Returns the uppercase alphabetic version of a number
public static string upperAlpha ( \craft\helpers\int $num )
$num |
integer | The number |
return | string | The alphabetic version of the number |
---|
upperRoman()
public static method
#
Returns the uppercase roman numeral version of a number
public static string upperRoman ( \craft\helpers\int $num )
$num |
integer | The number |
return | string | The roman numeral version of the number |
---|
word()
public static method
#
Returns the "word" version of a number
public static string word ( \craft\helpers\int $num )
$num |
integer | The number |
return | string | The number word, or the original number if it's >= 10 |
---|