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

Class: WBproductModel

Source Location: /WBproductModel.php

Class Overview

WBobject
   |
   --WBproductModel

This class manages WBproductModel objects. Group of articles sold that correspond to a common management logic (i.e. for planning) Created on 25 jun 09


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 34]
This class manages WBproductModel objects. Group of articles sold that correspond to a common management logic (i.e. for planning) Created on 25 jun 09

Changes: 1.2 -> 1.3: 29 jul 09 added: "wbProductModelCompany" => "WBcompany" to $this->aObjects 1.1 -> 1.2: 15 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(
        "wbProductModelRange"   =>  "WBproductRange",
        "wbProductModelCompany" =>  "WBcompany"
    )

[line 87]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 40]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "wbProductModelID"

[line 82]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBproductModel"

[line 45]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbProductModelCompany =

[line 71]

Variable that contains product model company object



Tags:

access:  public

Type:   object


[ Top ]

$wbProductModelCompanyID =

[line 76]

Variable that contains product model company ID



Tags:

access:  public

Type:   int


[ Top ]

$wbProductModelID =

[line 51]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbProductModelName =

[line 56]

Variable that contains product model name



Tags:

access:  public

Type:   string


[ Top ]

$wbProductModelRange =

[line 61]

Variable that contains product model range object



Tags:

access:  public

Type:   object


[ Top ]

$wbProductModelRangeID =

[line 66]

Variable that contains product model range ID



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createWBproductModel [line 130]

object created createWBproductModel( string $this->wbProductModelName, object $this->wbProductModelRange, object $this->wbProductModelcompany)

WBproductModel object creation function

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

  1.  <?php
  2.  $aVars           array(
  3.       "wbProductModelName"    =>  "fooName",
  4.       "wbProductModelRange"   =>  $oWBproductRange,
  5.       "wbProductModelCompany" =>  $oWBcompany
  6.  );
  7.  $oWBproductModel new WBproductModel($aVars);
  8.  echo $oWBproductModel->createWBproductModel()->wbProductModelID;
  9.  // productmodelID
  10.  ?>




Tags:

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


Parameters:

string   $this->wbProductModelName   name of the product model (required)
object   $this->wbProductModelRange   WBproductRange object (required)
object   $this->wbProductModelcompany   WBcompany object (required)

[ Top ]

method deleteWBproductModel [line 304]

bool deleteWBproductModel( int $this->wbProductModelID)

WBproductModel object deletion function

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

  1.  <?php
  2.  $aVars                array("wbProductModelID" => 12);
  3.  $oWBproductModel      new WBproductModel($aVars);
  4.  echo $oWBproductModel->deleteWBproductModel();
  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->wbProductModelID   ID of the product model to be deleted (required)

[ Top ]

method getWBproductModel [line 348]

object WBproductModel getWBproductModel( int $this->wbProductModelID)

WBproductModel object obtention function

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

  1.  <?php
  2.  $aVars                array("wbProductModelID" => 12);
  3.  $oWBproductModel      new WBproductModel($aVars);
  4.  echo $oWBproductModel->getWBproductModel()->wbProductModelName;
  5.  // fooName
  6.  ?>




Tags:

return:  object
since:  Version 1.0
usedby:  WBproductItem::getWBproductItem()
uses:  WBproductRange::getWBproductRange()
uses:  WBobject::getUniqueFromDB()
uses:  WBcompany::getWBcompany()


Parameters:

int   $this->wbProductModelID   ID of the product model to get (required)

[ Top ]

method updateWBproductModel [line 216]

object updated updateWBproductModel( int $this->wbProductModelID, string $this->wbProductModelName, object $this->wbProductModelRange, object $this->wbProductModelCompany)

WBproductModel object update function

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

  1.  <?php
  2.  $aVars           array(
  3.       "wbProductModelID"  =>  12,
  4.       "wbProductModelName"    =>  "fooName",
  5.       "wbProductModelRange"   =>  $oProductRange,
  6.       "wbProductModelCompany" =>  $oWBcompany
  7.  );
  8.  $oWBproductModel new WBproductModel($aVars);
  9.  echo $oWBproductModel->updateWBproductModel()->wbProductModelID;
  10.  // 12
  11.  ?>




Tags:

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


Parameters:

int   $this->wbProductModelID   ID of the product model to be updated (required)
string   $this->wbProductModelName   name of the product model (required)
object   $this->wbProductModelRange   product range (required)
object   $this->wbProductModelCompany   supplier (required)

[ Top ]


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