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

Class: WBcompany

Source Location: /WBcompany.php

Class Overview

WBobject
   |
   --WBcompany

This class manages WBcompany objects. These objects are companies linked to EVS (customers and suppliers).


Author(s):

Version:

  • 1.4

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 WBcompany objects. These objects are companies linked to EVS (customers and suppliers).

Created on 22 jun 09

Changes: 1.3 -> 1.4: 15 jul 09 updated: file is PEAR compatible 1.2 -> 1.3: 03 jul 09 added: $this->sIDrowname, $this->aObjects 1.1 -> 1.2: 29 jun 09 added: isSupplierWBcompany() function 1.0 -> 1.1: 25 jun 09 added: getWBcompany() function




Tags:

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


[ Top ]


Class Variables

$aObjects = array()

[line 73]

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

[line 68]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "WBcompany"

[line 45]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$wbCompanyID =

[line 51]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$wbCompanyISsupplier =  2

[line 62]

Variable that contains supplier flag.

If value is equal to 1, company is a supplier.




Tags:

access:  public

Type:   int


[ Top ]

$wbCompanyName =

[line 56]

Variable that contains company name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createWBcompany [line 110]

object created createWBcompany( string $this->wbCompanyName, string $this->wbCompanyISsupplier)

WBcompany object creation function

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

  1.  <?php
  2.  $aVars      array(
  3.       "wbCompanyName" => "FooCompany",
  4.       "wbCompanyISsupplier" => 2
  5.  );
  6.  $oWBcompany new WBcompany($aVars);
  7.  echo $oWBcompany->createWBcompany()->wbCompanyID;
  8.  // companyID
  9.  ?>




Tags:

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


Parameters:

string   $this->wbCompanyName   name of the company (required)
string   $this->wbCompanyISsupplier   flag defining if the company is a supplier

[ Top ]

method deleteWBcompany [line 234]

bool deleteWBcompany( int $this->wbCompanyID)

WBcompany object deletion function

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

  1.  <?php
  2.  $aVars            array("wbCompanyID" => 12);
  3.  $oWBcompany       new WBcompany($aVars);
  4.  echo $oWBcompany->deleteWBcompany();
  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->wbCompanyID   ID of the company to be deleted (required)

[ Top ]

method getWBcompany [line 275]

object WBcompany getWBcompany( int $this->wbCompanyID)

WBcompany object obtention function

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

  1.  <?php
  2.  $aVars            array("wbCompanyID" => 12);
  3.  $oWBcompany       new WBcompany($aVars);
  4.  echo $oWBcompany->getWBcompany()->wbCompanyName;
  5.  // fooName
  6.  ?>




Tags:

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


Parameters:

int   $this->wbCompanyID   ID of the company to get (required)

[ Top ]

method isSupplierWBcompany [line 316]

object WBcompany isSupplierWBcompany( int $this->wbCompanyISsupplier)

WBcompany object obtention function

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

  1.  <?php
  2.  $aVars            array("wbCompanyID" => 12);
  3.  $oWBcompany       new WBcompany($aVars);
  4.  echo $oWBcompany->getWBcompany()->isSupplierWBcompany();
  5.  // 1
  6.  ?>




Tags:

return:  object
since:  Version 1.2


Parameters:

int   $this->wbCompanyISsupplier   flag defining if company is a supplier (required)

[ Top ]

method updateWBcompany [line 174]

object updated updateWBcompany( int $this->wbCompanyID, string $this->wbCompanyName, int $this->wbCompanyISsupplier)

WBcompany object update function

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

  1.  <?php
  2.  $aVars      array(
  3.       "wbCompanyID" => 12,
  4.       "wbCompanyName" => "fooCompany",
  5.       "wbCompanyISsupplier" => 1
  6.  );
  7.  $oWBcompany new WBcompany($aVars);
  8.  echo $oWBcompany->updateWBcompany()->wbCompanyID;
  9.  // 12
  10.  ?>




Tags:

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


Parameters:

int   $this->wbCompanyID   ID of the company to be updated (required)
string   $this->wbCompanyName   Name of the company (required)
int   $this->wbCompanyISsupplier   Flag defining if the company is a supplier (required)

[ Top ]


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