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

Class: WBcurrency

Source Location: /WBcurrency.php

Class Overview

WBobject
   |
   --WBcurrency

This class manages WBcurrency objects. Official ISO currency.


Author(s):

Version:

  • 1.2

Variables

Methods


Inherited Methods

Class: WBobject

WBobject::__construct()
Construction function
WBobject::addToDB()
Rows insertion to database function
WBobject::deleteFromDB()
Rows deletion function
WBobject::getIDrowname()
ID rowname obtention function
WBobject::getObjects()
Objects list obtention function
WBobject::getUniqueFromDB()
Unique Row obtention function
WBobject::objectToArray()
Object to array transformation function
WBobject::updateDB()
Rows update function

Class Details

[line 31]
This class manages WBcurrency objects. Official ISO currency.

Created on 25 jun 09

Changes: 1.1 -> 1.2: 15 jul 09 updated: file is PEAR compatible 1.0 -> 1.1: 03 jul 09 added: $this->sIDrowname, $this->aObjects




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.2
license:  GNU Public License


[ Top ]


Class Variables

$aObjects = array()

[line 69]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 37]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbCurrencyID"

[line 64]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBcurrency"

[line 42]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbCurrencyID =

[line 48]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbCurrencyISO3 =

[line 53]

Variable that contains ISO code for currency in 3 letters



Tags:

access:  public

Type:   string


[ Top ]

$wbCurrencyName =

[line 58]

Variable that contains currency name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createWBcurrency [line 105]

object created createWBcurrency( string $this->wbCurrencyISO3, string $this->wbCurrencyName)

WBcurrency object creation function

This function is used to create a WBcurrency object Result is stored in $this and object is returned

  1.  <?php
  2.  $aVars       array(
  3.       "wbCurrencyISO3"    =>  "FOO",
  4.       "wbCurrencyName"    =>  "barName"
  5.  );
  6.  $oWBcurrency new WBcurrency($aVars);
  7.  echo $oWBcurrency->createWBcurrency()->wbCurrencyID;
  8.  // currencyID
  9.  ?>




Tags:

return:  object or false
since:  Version 1.0
uses:  WBobject::addToDB()


Parameters:

string   $this->wbCurrencyISO3   ISO code for the currency in 3 letters (required)
string   $this->wbCurrencyName   currency name (required)

[ Top ]

method deleteWBcurrency [line 248]

bool deleteWBcurrency( int $this->wbCurrencyID)

WBcurrency object deletion function

This function is used to delete a WBcurrency by its ID Result is returned

  1.  <?php
  2.  $aVars       array("wbCurrencyID" => 12);
  3.  $oWBcurrency new WBcurrency($aVars);
  4.  echo $oWBcurrency->deleteWBcurrency();
  5.  // 1
  6.  ?>




Tags:

return:  true or false weither the object could be deleted or not
since:  Version 1.0
uses:  WBobject::deleteFromDB()


Parameters:

int   $this->wbCurrencyID   ID of the currency to be deleted (required)

[ Top ]

method getWBcurrency [line 289]

object WBcurrency getWBcurrency( int $this->wbCurrencyID)

WBcurrency object obtention function

This function is used to get a WBcurrency by its ID Result is returned

  1.  <?php
  2.  $aVars       array("wbCurrencyID" => 12);
  3.  $oWBcurrency new WBcurrency($aVars);
  4.  echo $oWBcurrency->getWBcurrency()->wbCurrencyName;
  5.  // fooName
  6.  ?>




Tags:

return:  object
since:  Version 1.0
usedby:  Link_WBcurrency_WBcountry::getLink_WBcurrency_WBcountry()
uses:  WBobject::getUniqueFromDB()


Parameters:

int   $this->wbCurrencyID   ID of the currency to get (required)

[ Top ]

method updateWBcurrency [line 176]

object updated updateWBcurrency( int $this->wbCurrencyID, string $this->wbCurrencyISO3, string $this->wbCurrencyName)

WBcurrency object update function

This function is used to update a WBcurrency Result is stored in $this and object is returned

  1.  <?php
  2.  $aVars       array(
  3.       "wbCurrencyID"  =>  12,
  4.       "wbCurrencyISO3"    =>  "FOO",
  5.       "wbCurrencyName"    =>  "barName"
  6.  );
  7.  $oWBcurrency new WBcurrency($aVars);
  8.  echo $oWBcurrency->updateWBcurrency()->wbProfileID;
  9.  // 12
  10.  ?>




Tags:

return:  object or false
since:  Version 1.0
uses:  WBobject::updateDB()


Parameters:

int   $this->wbCurrencyID   ID of the currency to be updated (required)
string   $this->wbCurrencyISO3   ISO code for the currency in 3 letters (required)
string   $this->wbCurrencyName   currency name (required)

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:31:04 +0200 by phpDocumentor 1.4.1