Numbers_Roman
[ class tree: Numbers_Roman ] [ index: Numbers_Roman ] [ all elements ]

Class: Numbers_Roman

Source Location: /Numbers_Roman-1.0.2/Roman.php

Class Overview


Provides utilities to convert roman numerals to arabic numbers and convert arabic numbers to roman numerals.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 49]
Provides utilities to convert roman numerals to arabic numbers and convert arabic numbers to roman numerals.

Supports lower case input and output and some further conversion functions.



[ Top ]


Method Detail

toNumber   [line 62]

integer toNumber( string $roman)

Converts a roman numeral to a number
  • Return: The number corresponding to the given roman numeral
  • Access: public

Parameters:

string   $roman   —  The roman numeral to convert lower cased numerals are converted into uppercase

[ Top ]

toNumeral   [line 215]

string toNumeral( integer $num, [bool $uppercase = true], [bool $html = true])

Converts a number to its roman numeral representation
  • Return: The corresponding roman numeral
  • Access: public

Parameters:

integer   $num   —  An integer between 0 and 3999 inclusive that should be converted to a roman numeral integers higher than 3999 are supported from version 0.1.2 Note: For an accurate result the integer shouldn't be higher than 5 999 999. Higher integers are still converted but they do not reflect an historically correct Roman Numeral.
bool   $uppercase   —  Uppercase output: default true
bool   $html   —  Enable html overscore required for integers over 3999. default true

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:10:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.