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

Class: WBcountry

Source Location: /WBcountry.php

Class Overview

WBobject
   |
   --WBcountry

This class manages WBcountry objects. These objects are geographical countries.


Author(s):

Version:

  • 1.3

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 36]
This class manages WBcountry objects. These objects are geographical countries.

Created on 22 jun 09

Changes: 1.2 -> 1.3: 17 aug 09 updated: createWBcountryISO() and updateWBcountryISO() functions bugs on Strings::stringHasNumbers() solved 1.1 -> 1.2: 15 jul 09 updated: file is PEAR compatible 1.0 -> 1.1: 30 jun 09 added: getWBcountry() function




Tags:

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


[ Top ]


Class Variables

$aObjects = array()

[line 82]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 42]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbCountryID"

[line 77]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBcountry"

[line 47]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbCountryID =

[line 53]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbCountryISO2 =

[line 58]

Variable that contains ISO code for the country in 2 letters



Tags:

access:  public

Type:   string


[ Top ]

$wbCountryISO3 =

[line 63]

Variable that contains ISO code for the countryin 3 letters



Tags:

access:  public

Type:   string


[ Top ]

$wbCountryISOname =

[line 68]

Variable that contains ISO name for the country



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createWBcountryISO [line 122]

object created createWBcountryISO( string $this->wbCountryISO2, string $this->wbCountryISO3, string $this->wbCountryISOname)

WBcountryISO object creation function

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

  1.  <?php
  2.  $aVars      array(
  3.       "wbCountryISO2" =>  "CH",
  4.       "wbCountryISO3" =>  "CHE",
  5.       "wbCountryISOname"  =>  "Switzerland"
  6.  );
  7.  $oWBcountry new WBcountry($aVars);
  8.  echo $oWBcountry->createWBcountryISO()->wbCountryID;
  9.  // countryID
  10.  ?>




Tags:

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


Parameters:

string   $this->wbCountryISO2   ISO 3166-1 alpha-2 string of the country (required)
string   $this->wbCountryISO3   ISO 3166-1 alpha-3 string of the country (required)
string   $this->wbCountryISOname   ISO name of the country (required)

[ Top ]

method deleteWBcountryISO [line 297]

bool deleteWBcountryISO( int $this->wbCountryID)

WBcountryISO object deletion function

This function is used to delete a WBcountryISO Result is returned

  1.  <?php
  2.  $aVars            array("wbCountryISOID" => 12);
  3.  $oWBcountry       new WBcountry($aVars);
  4.  echo $oWBcountry->deleteWBcountryISO();
  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->wbCountryID   ID of the country to be updated (required)

[ Top ]

method getWBcountry [line 337]

object WBcountry getWBcountry( int $this->wbCountryID)

WBcountry object obtention function

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

  1.  <?php
  2.  $aVars            array("wbCountryID" => 12);
  3.  $oWBcountry       new WBcountry($aVars);
  4.  echo $oWBcountry->getWBcountry()->wbCountryISOName;
  5.  // fooName
  6.  ?>




Tags:



Parameters:

int   $this->wbCountryID   ID of the country to get (required)

[ Top ]

method updateWBcountryISO [line 209]

object updated updateWBcountryISO( int $this->wbCountryID, string $this->wbCountryISO2, string $this->wbCountryISO3, string $this->wbCountryISOname)

WBcountryISO object update function

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

  1.  <?php
  2.  $aVars      array(
  3.       "wbCountryISOID" => 12,
  4.       "wbCountryISO2" => "CH",
  5.       "wbCountryISO3" => "CHE",
  6.       "wbCountryISOname" => "Switzerland"
  7.  );
  8.  $oWBcountry new WBcountry($aVars);
  9.  echo $oWBcountry->updateWBcountryISO()->wbCountryID;
  10.  // 12
  11.  ?>




Tags:

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


Parameters:

int   $this->wbCountryID   ID of the country to be updated (required)
string   $this->wbCountryISO2   ISO 3166-1 alpha-2 string of the country (required)
string   $this->wbCountryISO3   ISO 3166-1 alpha-3 string of the country (required)
string   $this->wbCountryISOname   ISO name of the country (required)

[ Top ]


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