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

Class: GEOcurrencies

Source Location: /GEOcurrencies.php

Class Overview


This class manages GEOcurrencies objects. It principally interacts with database listings.


Author(s):

Version:

  • 2.1

Variables

Methods



Class Details

[line 36]
This class manages GEOcurrencies objects. It principally interacts with database listings.

Created on 01 jan 09

Changes: 2.0 -> 2.1: 27 jul 09 updated: file is PEAR compatible name of class has been changed from Currencies to GEOcurrencies 1.0 -> 2.0: updated: phpdoc compatible in the way to generate documentation




Tags:



[ Top ]


Class Variables

$curr_code =

[line 64]

Variable that contains currency code



Tags:

access:  public

Type:   string


[ Top ]

$curr_ID =

[line 54]

Variable that contains currency ID



Tags:

access:  public

Type:   int


[ Top ]

$curr_name =

[line 59]

Variable that contains currency name



Tags:

access:  public

Type:   string


[ Top ]

$database =  "currencies"

[line 42]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$debug =  false

[line 76]

Variable that contains debug switch.



Tags:

access:  public

Type:   bool


[ Top ]

$result =

[line 70]

Variable that contains Select results



Tags:

access:  public

Type:   array


[ Top ]

$table =  "currencies"

[line 47]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 105]

GEOcurrencies __construct( [array $aParams = null], [string $sAction = null])

Construction function

This function is used when object is generated. It places variables in "$this" var and can launch function

  1.  <?php
  2.  $aParams        array("curr_code" => "EUR");
  3.  $oCurrencies    new GEOcurrencies($aParams"getByCode");
  4.  echo $oCurrencies->curr_name;
  5.  // Euro
  6.  ?>




Tags:

since:  version 1.0
uses:  Strings


Parameters:

array   $aParams   array containing variable names and their value ($variablename => $value)
string   $sAction   string containing action to perform on object creation

[ Top ]

method getByCode [line 159]

int getByCode( string $this->database, string $this->table, string $this->curr_code)

Currency by code obtention function

This function is used to get currency object by its code. Result is stored in $this and currency ID is returned

  1.  <?php
  2.  $aParams     array("curr_code" => "EUR");
  3.  $oCurrencies new GEOcurrencies($aParams"getByCode");
  4.  echo $oCurrencies->curr_name;
  5.  // Euro
  6.  ?>




Tags:

return:  currency ID
since:  version 1.0


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $this->curr_code   currency code

[ Top ]

method listCurrencies [line 211]

int listCurrencies( string $this->database, string $this->table)

Currency listing function

This function is used to get a currency listing. Result is stored in $this->result and number of fetched rows is returned

  1.  <?php
  2.  $oCurrencies    new GEOcurrencies();
  3.  $oCurrencies->listCurrencies();
  4.  echo $oCurrencies->result[0]["curr_name"];
  5.  // Euro
  6.  ?>




Tags:

return:  number of fetched rows
since:  version 1.0


Parameters:

string   $this->database   database name
string   $this->table   table name

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:15 +0200 by phpDocumentor 1.4.1