Class currency

Description

Currency class to perform the majority of currency related functions in ILance

  • author: ILance
  • version: $Revision: 1.0.0 $

Located in /api/class.currency.inc.php (line 23)


	
			
Variable Summary
mixed $currencies
Method Summary
currency currency ()
void fetch_user_currency ([ $userid = 0])
void format ([ $number = 0], [ $currencyid = 0], [ $hidesymbols = false], [ $forcedecimalhide = false])
void pulldown ([ $inputtype = ''], [ $variableinfo = ''])
integer string_to_number (integer $price)
Variables
mixed $currencies = array() (line 25)
Methods
Constructor currency (line 31)

Constructor

currency currency ()
fetch_default_currencyid (line 123)

Function to fetch the default currency id installed for the marketplace

void fetch_default_currencyid ()
fetch_user_currency (line 134)

Function to fetch a user's default currency setup when they registered or edited their profile

void fetch_user_currency ([ $userid = 0])
  • $userid
format (line 75)

Function to properly format a dollar value based on the database currency settings (symbols, decimal places, thousands place, etc)

void format ([ $number = 0], [ $currencyid = 0], [ $hidesymbols = false], [ $forcedecimalhide = false])
  • $number
  • $currencyid
  • $hidesymbols
  • $forcedecimalhide
pulldown (line 158)

Function to build a currency selector pulldown menu element

void pulldown ([ $inputtype = ''], [ $variableinfo = ''])
  • $inputtype
  • $variableinfo
string_to_number (line 223)

Function to take a string inputted by a user based on a dollar amount to be converted into 2 decimal places.

Example: 1,002.23 = 1002.23 or 12 = 12.00, etc.

  • return: return 2 decimal place dollar amount ready for storing into database
integer string_to_number (integer $price)
  • integer $price: input price to be evaluated

Documentation generated on Mon, 08 Aug 2011 17:40:53 +0200 by phpDocumentor 1.4.1