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

Class: WBregion

Source Location: /WBregion.php

Class Overview

WBobject
   |
   --WBregion

This class manages WBregion objects.


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 35]
This class manages WBregion objects.

Created on 01 jul 09

Changes: 1.2 -> 1.3: 13 aug 09 updated: updateWBregion() function critical bug solved createWBregion() function critical bug solved 1.1 -> 1.2: 14 jul 09 updated: file is PEAR compatible 1.0 -> 1.1: 02 jul 09 added: $this->sIDrowname, $this->aObjects




Tags:

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


[ Top ]


Class Variables

$aObjects = array("wbRegionSubZone"=>"WBsubZone")

[line 78]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 41]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbRegionID"

[line 73]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBregion"

[line 46]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbRegionID =

[line 52]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbRegionName =

[line 57]

Variable that contains region name



Tags:

access:  public

Type:   string


[ Top ]

$wbRegionSubZone =

[line 62]

Variable that contains subzone object



Tags:

access:  public

Type:   object


[ Top ]

$wbRegionSubZoneID =

[line 67]

Variable that contains subzone ID



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createWBregion [line 111]

object created createWBregion( string $this->wbRegionName, object $this->wbRegionSubZone)

WBregion object creation function

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

  1.  <?php
  2.  $aVars     array("wbRegionName" => "fooName",
  3.       "wbRegionSubZone" => $oWBsubZone);
  4.  $oWBregion new WBregion($aVars);
  5.  echo $oWBregion->createWBregion()->wbRegionID;
  6.  // regionID
  7.  ?>




Tags:

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


Parameters:

string   $this->wbRegionName   name of the region (required)
object   $this->wbRegionSubZone   subzone of the region (required)

[ Top ]

method deleteWBregion [line 256]

bool deleteWBregion( int $this->wbRegionID)

WBregion object deletion function

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

  1.  <?php
  2.  $aVars                array("wbRegionID" => 12);
  3.  $oWBregion            new WBregion($aVars);
  4.  echo $oWBregion->deleteWBregion();
  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->wbRegionID   ID of the region to be deleted (required)

[ Top ]

method getWBregion [line 298]

object WBregion getWBregion( int $this->wbRegionID)

WBregion object obtention function

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

  1.  <?php
  2.  $aVars                array("wbRegionID" => 12);
  3.  $oWBregion            new WBregion($aVars);
  4.  echo $oWBregion->getWBregion()->wbRegionName;
  5.  // fooName
  6.  ?>




Tags:

return:  object
since:  Version 1.0
uses:  WBsubZone::getWBsubZone()
uses:  WBobject::getUniqueFromDB()


Parameters:

int   $this->wbRegionID   ID of the region to get (required)

[ Top ]

method updateWBregion [line 179]

object updated updateWBregion( int $this->wbRegionID, string $this->wbRegionName, object $this->wbRegionSubZone)

WBregion object update function

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

  1.  <?php
  2.  $aVars     array("wbRegionID" => 12"wbRegionName" => "fooName",
  3.       "wbRegionSubZone" => $oWBsubZone);
  4.  $oWBregion new WBregion($aVars);
  5.  echo $oWBregion->updateWBregion()->wbRegionID;
  6.  // 12
  7.  ?>




Tags:

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


Parameters:

int   $this->wbRegionID   ID of the region to be updated (required)
string   $this->wbRegionName   name of the region (required)
object   $this->wbRegionSubZone   subzone of the region (required)

[ Top ]


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