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

Class: WBproductItem

Source Location: /WBproductItem.php

Class Overview

WBobject
   |
   --WBproductItem

This class manages WBproductItem objects. Article sold with all relevant information.


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 WBproductItem objects. Article sold with all relevant information.

Created on 29 jun 09

Changes: 1.2 -> 1.3: 14 aug 09 updated: updateWBproductItem() function bug solved 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.3
license:  GNU Public License


[ Top ]


Class Variables

$aObjects = array(
        "wbProductItemModel"    =>  "WBproductModel"
    )

[line 82]

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 =  "wbProductItemID"

[line 77]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBproductItem"

[line 45]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbProductItemCode =

[line 56]

Variable that contains product item code



Tags:

access:  public

Type:   string


[ Top ]

$wbProductItemDescription =

[line 61]

Variable that contains product item description



Tags:

access:  public

Type:   string


[ Top ]

$wbProductItemID =

[line 51]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbProductItemModel =

[line 66]

Variable that contains product item model



Tags:

access:  public

Type:   object


[ Top ]

$wbProductItemModelID =

[line 71]

Variable that contains product item model ID



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createWBproductItem [line 124]

object created createWBproductItem( string $this->wbProductItemCode, string $this->wbProductItemDescription, object $this->wbProductItemModel)

WBproductItem object creation function

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

  1.  <?php
  2.  $aVars          array(
  3.       "wbProductItemCode" =>  "fooCode",
  4.       "wbProductItemDescription"  =>  "barDescription",
  5.       "wbProductItemModel"    =>  $oWBproductModel
  6.  );
  7.  $oWBproductItem new WBproductItem($aVars);
  8.  echo $oWBproductItem->createWBproductItem()->wbProductItemID;
  9.  // productitemID
  10.  ?>




Tags:

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


Parameters:

string   $this->wbProductItemCode   code of the product item (required)
string   $this->wbProductItemDescription   description of the product item (required)
object   $this->wbProductItemModel   WBproductModel object (required)

[ Top ]

method deleteWBproductItem [line 278]

bool deleteWBproductItem( int $this->wbProductItemID)

WBproductItem object deletion function

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

  1.  <?php
  2.  $aVars                array("wbProductItemID" => 12);
  3.  $oWBproductItem       new WBproductItem($aVars);
  4.  echo $oWBproductItem->deleteWBproductItem();
  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->wbProductItemID   ID of the product item to be deleted (required)

[ Top ]

method getWBproductItem [line 321]

object WBproductItem getWBproductItem( int $this->wbProductItemID)

WBproductItem object obtention function

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

  1.  <?php
  2.  $aVars                array("wbProductItemID" => 12);
  3.  $oWBproductItem       new WBproductItem($aVars);
  4.  echo $oWBproductItem->getWBproductItem()->wbProductItemCode;
  5.  // fooCode
  6.  ?>




Tags:

return:  object
since:  Version 1.0
uses:  WBproductModel::getWBproductModel()
uses:  WBobject::getUniqueFromDB()


Parameters:

int   $this->wbProductItemID   ID of the product item to get (required)

[ Top ]

method updateWBproductItem [line 202]

object updated updateWBproductItem( int $this->wbProductItemID, string $this->wbProductItemCode, string $this->wbProductItemDescription, object $this->wbProductItemModel)

WBproductItem object update function

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

  1.  <?php
  2.  $aVars          array(
  3.       "wbProductItemID"   =>  12,
  4.       "wbProductItemCode" =>  "fooCode",
  5.       "wbProductItemDescription"  =>  "barDescription",
  6.       "wbProductItemModel"    =>  $owbProductModel
  7.  );
  8.  $oWBproductItem new WBproductItem($aVars);
  9.  echo $oWBproductItem->updateWBproductItem()->wbProductItemID;
  10.  // 12
  11.  ?>




Tags:

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


Parameters:

int   $this->wbProductItemID   ID of the product item to be updated (required)
string   $this->wbProductItemCode   code of the product item (required)
string   $this->wbProductItemDescription   description of the product item (required)
object   $this->wbProductItemModel   model of the product item (required)

[ Top ]


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