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

Class: WBobject

Source Location: /WBobject.php

Class Overview


This class manages WB objects. This is a main definition for others objects.


Author(s):

Version:

  • 1.6

Methods


Child classes:

GEOcity
This class manages GEOcity objects.
GEOcountry
This class manages GEOcountry objects.
Link_WBcurrency_WBcountry
Created on 30 jun 09
Link_WBmarket_WBcountry
Created on 30 jun 09
Link_WBprofiledUser_WBmarket
Created on 01 jul 09
SOheader
This class manages SOheader objects. General information of a supply order.
SOstatus
This class manages SOstatus objects. List of status that are available for supply orders.
SOtype
This class manages SOtype objects. List of types that are available for supply orders.
SPcycle
This class manages SPcycle objects. Reference to one planning cyclic exercise of a given Market.
SPcycleType
This class manages SPcycleType objects. Details of the type of cycles used with details on their frequencies and horizons used.
SPitem
This class manages SPitem objects. An element that needs to be planned (updated / calculated) in a given planning cycle.
SPitemSet
This class manages SPitemSet objects. It holds all the detailed planning information stored and calculated during the planning exercise for a specific SPitem.
SPitemType
This class manages SPitemType objects. List of elements used along the planning exercise, which specifies both the nature of the data and the point of measure.
SPsetup
This class manages SPsetup objects. Planning settings that describe both the planning and the planned network.
SPstatus
This class manages SPstatus objects. Possible status that can qualify the progress of the activity that is performaed on an item.
TSbucket
This class manages TSbucket objects. Information linked to a specific period.
TSbucketSet
This class manages TSbucketSet objects. Series of information linked to a specific horizon.
TShorizon
This class manages TShorizon objects. Collection of horizons available with links to periods.
TShorizonType
This class manages TShorizonType objects. Type of horizons available with rules for naming and horizon definition.
TSperiod
This class manages TSperiod objects. Collection of periods of time available with time related details.
TSperiodMatch
This class manages TSperiodMatch objects. Match between two periods to indicate the number common days.
TSperiodType
This class manages TSperiodType objects. Types of periods available with rules for naming and period definition.
WBactivityLog
This class manages WBactivityLog objects. Details of the key events (built-in the methods of the various classes) that have happened in relation to an application.
WBapplication
This class manages WBapplication objects. These objects are applications used in EVS.
WBcollection
This class manages WBcollection. This is a main definition for collection of objects.
WBcompany
This class manages WBcompany objects. These objects are companies linked to EVS (customers and suppliers).
WBcountry
This class manages WBcountry objects. These objects are geographical countries.
WBcurrency
This class manages WBcurrency objects. Official ISO currency.
WBmarket
This class manages WBmarket objects. Grouping of one or more countries that are referred to as a market.
WBproductItem
This class manages WBproductItem objects. Article sold with all relevant information.
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
WBproductRange
This class manages WBproductRange objects. Groups of models that are used for similar purposes.
WBprofile
This class manages WBprofile objects. Profiles available for a given application (WBapplication, code, name, description).
WBprofiledUser
This class manages WBprofiledUser objects. User that has been given a
WBprofiledUserSetting
This class manages WBprofiledUserSetting objects. Settings that are specific to a User logged with a specific profile.
WBregion
This class manages WBregion objects.
WBreport
This class manages WBreport objects. Settings for issuing a report in a given application.
WBreportFamily
This class manages WBreportFamily objects. Families of reports used for describing and grouping the reports. Must be using the same horizon type.
WBsubZone
This class manages WBsubZone objects. Group of regions.
WBuser
This class manages WBuser objects. Authorized user within the application.
WBzone
This class manages WBzone objects. Group of sub-regions.

Class Details

[line 42]
This class manages WB objects. This is a main definition for others objects.

Created on 22 jun 09

Changes: 1.5 -> 1.6: 21 jul 09 added: objectToArray() function 1.4 -> 1.5: 17 jul 09 updated: getUniqueFromDB() function bug resolved 1.3 -> 1.4: 09 jul 09 updated: file is PEAR compatible 1.2 -> 1.3: 06 jul 09 updated: getUniqueFromDB() function uses getIDrowname() (suppressed passed parameter) updated: deleteFromDB() function uses getIDrowname() (suppressed passed parameter) 1.1 -> 1.2: 03 jul 09 added: getIDrowname() function 1.0 -> 1.1: 24 jun 09 added: getFromDB() function updated: addToDB() function (vars passation) updated: updateDB() function (vars passation) updated: deleteFromDB() function (vars passation) updated: class is now abstract




Tags:

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


[ Top ]


Class Methods


constructor __construct [line 66]

WBobject __construct( [array $aParams = null], [string $sAction = null])

Construction function

This function is used when object is generated. It places variables in "$this" var and can launch function

  1.  <?php
  2.  $aParams              array("man_name" => "Manufacturer name");
  3.  $oEW_Manufacturers    new EW_Manufacturers($aParams);
  4.  echo $oEW_Manufacturers->man_name;
  5.  // Manufacturer name
  6.  ?>




Tags:

since:  Version 1.0
uses:  Strings


Parameters:

array   $aParams   array containing variable names and their value ($variablename => $value)
string   $sAction   string containing action to perform on object creation

[ Top ]

method addToDB [line 118]

int addToDB( array $aRowsValues, string $sDatabase, string $sTable)

Rows insertion to database function

This function is used to add a row in specified table. Result is stored in $this and ID of the inserted row is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  $aRowsValues        array("row1" => "value1""row2" => "value2",
  4.      "row3" => "value3");
  5.  echo $oObject->addToDB($this->database$this->table$aRowsValues);
  6.  // rowID
  7.  ?>




Tags:

return:  insertion ID
since:  Version 1.0
access:  protected
usedby:  WBmarket::createWBmarket()
usedby:  WBproductItem::createWBproductItem()
usedby:  WBproductModel::createWBproductModel()
usedby:  WBcurrency::createWBcurrency()
usedby:  WBcompany::createWBcompany()
usedby:  WBactivityLog::createWBactivityLog()
usedby:  WBapplication::createWBapplication()
usedby:  WBproductRange::createWBproductRange()
usedby:  WBcountry::createWBcountryISO()
usedby:  WBprofile::createWBprofile()
usedby:  WBsubZone::createWBsubZone()
usedby:  WBuser::createWBuser()
usedby:  WBzone::createWBzone()
usedby:  WBreportFamily::createWBreportFamily()
usedby:  WBreport::createWBreport()
usedby:  WBprofiledUser::createWBprofiledUser()
usedby:  WBprofiledUserSetting::createWBprofiledUserSetting()
usedby:  WBregion::createWBregion()
usedby:  TSperiodType::createTSperiodType()
usedby:  TSperiod::createTSperiod()
usedby:  SOstatus::createSOstatus()
usedby:  SOtype::createSOtype()
usedby:  SPcycle::createSPcycle()
usedby:  SOheader::createSOheader()
usedby:  Link_WBprofiledUser_WBmarket::createLink_WBprofiledUser_WBmarket()
uses:  MySQL::InsertDatas()
usedby:  Link_WBcurrency_WBcountry::createLink_WBcurrency_WBcountry()
usedby:  Link_WBmarket_WBcountry::createLink_WBmarket_WBcountry()
usedby:  SPcycleType::createSPcycleType()
usedby:  SPitem::createSPitem()
usedby:  TSbucketSet::createTSbucketSet()
usedby:  TShorizon::createTShorizon()
usedby:  TShorizonType::createTShorizonType()
usedby:  TSbucket::createTSbucket()
usedby:  SPstatus::createSPstatus()
usedby:  SPitemSet::createSPitemSet()
usedby:  SPitemType::createSPitemType()
usedby:  SPsetup::createSPsetup()
usedby:  TSperiodMatch::createTSperiodMatch()


Parameters:

string   $sDatabase   database name (required)
string   $sTable   table name (required)
array   $aRowsValues   associative array containing values for insertion (required)

[ Top ]

method deleteFromDB [line 228]

bool deleteFromDB( string $this->database, string $this->table, string $sIDrow, int $this->$sIDrow)

Rows deletion function

This function is used to delete a row in specified table. Result is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  echo $oObject->deleteFromDB($this->database$this->table"linkID"12);
  4.  // 1
  5.  ?>




Tags:

return:  true or false weither the row could be deleted or not
since:  Version 1.0
access:  protected
usedby:  WBmarket::deleteWBmarket()
usedby:  WBproductItem::deleteWBproductItem()
usedby:  WBproductModel::deleteWBproductModel()
usedby:  WBcurrency::deleteWBcurrency()
usedby:  WBcompany::deleteWBcompany()
usedby:  WBactivityLog::deleteWBactivityLog()
usedby:  WBapplication::deleteWBapplication()
usedby:  WBproductRange::deleteWBproductRange()
usedby:  WBcountry::deleteWBcountryISO()
usedby:  WBprofile::deleteWBprofile()
usedby:  WBsubZone::deleteWBsubZone()
usedby:  WBuser::deleteWBuser()
usedby:  WBzone::deleteWBzone()
usedby:  WBreportFamily::deleteWBreportFamily()
usedby:  WBreport::deleteWBreport()
usedby:  WBprofiledUser::deleteWBprofiledUser()
usedby:  WBprofiledUserSetting::deleteWBprofiledUserSetting()
usedby:  WBregion::deleteWBregion()
usedby:  TSperiodType::deleteTSperiodType()
usedby:  TSperiod::deleteTSperiod()
usedby:  SOstatus::deleteSOstatus()
usedby:  SOtype::deleteSOtype()
usedby:  SPcycle::deleteSPcycle()
usedby:  SOheader::deleteSOheader()
usedby:  Link_WBprofiledUser_WBmarket::deleteLink_WBprofiledUser_WBmarket()
uses:  MySQL::UpdateRow()
usedby:  Link_WBcurrency_WBcountry::deleteLink_WBcurrency_WBcountry()
usedby:  Link_WBmarket_WBcountry::deleteLink_WBmarket_WBcountry()
usedby:  SPcycleType::deleteSPcycleType()
usedby:  SPitem::deleteSPitem()
usedby:  TSbucketSet::deleteTSbucketSet()
usedby:  TShorizon::deleteTShorizon()
usedby:  TShorizonType::deleteTShorizonType()
usedby:  TSbucket::deleteTSbucket()
usedby:  SPstatus::deleteSPstatus()
usedby:  SPitemSet::deleteSPitemSet()
usedby:  SPitemType::deleteSPitemType()
usedby:  SPsetup::deleteSPsetup()
usedby:  TSperiodMatch::deleteTSperiodMatch()


Parameters:

string   $this->database   database name (required)
string   $this->table   table name (required)
string   $sIDrow   name of the ID row (required)
int   $this->$sIDrow   value of the ID (required)

[ Top ]

method getIDrowname [line 320]

string getIDrowname( string $this->sIDrowname)

ID rowname obtention function

This function is used to get the ID rowname of the object. Result is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  echo $oObject->getIDrowname();
  4.  // IDrowname
  5.  ?>




Tags:

return:  rowname of the ID
since:  Version 1.2
access:  protected
usedby:  WBcollection::renderHTMLselect()
usedby:  WBcollection::getFromDB()


Parameters:

string   $this->sIDrowname   ID rowname (required)

[ Top ]

method getObjects [line 351]

string getObjects( string $this->aObjects)

Objects list obtention function

This function is used to get the objects array of the object. Result is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  echo $oObject->getObjects();
  4.  // aObjects
  5.  ?>




Tags:

return:  objects array
since:  Version 1.2
access:  protected
usedby:  WBcollection::getFromDB()


Parameters:

string   $this->aObjects   objects array (required)

[ Top ]

method getUniqueFromDB [line 271]

object fetched getUniqueFromDB( string $this->database, string $this->table, string $sIDrow, int $this->$sIDrow)

Unique Row obtention function

This function is used to get a row by its ID in specified table. Result is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  print_r($oObject->getUniqueFromDB($this->database$this->table"linkID"12));
  4.  // linkID => 12 ...
  5.  ?>




Tags:

return:  object
since:  Version 1.1
access:  protected
usedby:  WBcurrency::getWBcurrency()
usedby:  WBmarket::getWBmarket()
usedby:  WBproductItem::getWBproductItem()
usedby:  WBcountry::getWBcountry()
usedby:  WBapplication::getWBapplication()
usedby:  TSperiodType::getTSperiodType()
usedby:  WBactivityLog::getWBactivityLog()
usedby:  WBproductModel::getWBproductModel()
usedby:  WBcompany::getWBcompany()
usedby:  WBprofile::getWBprofile()
usedby:  WBreportFamily::getWBprofiledUser()
usedby:  WBsubZone::getWBsubZone()
usedby:  WBuser::getWBuser()
usedby:  WBzone::getWBzone()
usedby:  WBreport::getWBreport()
usedby:  WBregion::getWBregion()
usedby:  TSperiodMatch::getTSperiodMatch()
usedby:  WBprofiledUser::getWBprofiledUser()
usedby:  WBprofiledUserSetting::getWBprofiledUserSetting()
usedby:  WBproductRange::getWBproductRange()
usedby:  TShorizonType::getTShorizonType()
usedby:  Link_WBprofiledUser_WBmarket::getLink_WBprofiledUser_WBmarket()
usedby:  SOheader::getSOheader()
usedby:  SOstatus::getSOstatus()
usedby:  SOtype::getSOtype()
usedby:  Link_WBmarket_WBcountry::getLink_WBmarket_WBcountry()
usedby:  Link_WBcurrency_WBcountry::getLink_WBcurrency_WBcountry()
uses:  MySQL::SelectRow()
usedby:  GEOcity::getGEOcity()
usedby:  GEOcountry::getGEOcountry()
usedby:  SPcycle::getSPcycle()
usedby:  SPcycleType::getSPcycleType()
usedby:  TSbucket::getTSbucket()
usedby:  TSbucketSet::getTSbucketSet()
usedby:  TShorizon::getTShorizon()
usedby:  SPstatus::getSPstatus()
usedby:  SPsetup::getSPsetup()
usedby:  SPitem::getSPitem()
usedby:  SPitemSet::getSPitemSet()
usedby:  SPitemType::getSPitemType()
usedby:  TSperiod::getTSperiod()


Parameters:

string   $this->database   database name (required)
string   $this->table   table name (required)
string   $sIDrow   name of the ID row (required)
int   $this->$sIDrow   value of the ID (required)

[ Top ]

method objectToArray [line 382]

array objectToArray( object $data)

Object to array transformation function

This function is used to render an array from an object. Result is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  print_r($oObject->objectToArray($oFooObject));
  4.  // aTransformedIntoArray
  5.  ?>




Tags:

return:  transformed array
since:  version 1.6


Parameters:

object   $data   object to be transformed (required)

[ Top ]

method updateDB [line 175]

int updateDB( string $sIDrow, array $aRowsValues, string $this->database, string $this->table, int $this->$sIDrow)

Rows update function

This function is used to update a row in specified table. Result is stored in $this and ID of the inserted row is returned

  1.  <?php
  2.  $oObject            new WBobject();
  3.  $aRowsValues        array("row1" => "value1""row2" => "value2",
  4.      "row3" => "value3");
  5.  echo $oObject->updateDB($this->database$this->table"linkID"12,
  6.      $aRowsValues);
  7.  // rowID
  8.  ?>




Tags:

return:  updated ID
since:  Version 1.0
access:  protected
usedby:  WBmarket::updateWBmarket()
usedby:  WBproductItem::updateWBproductItem()
usedby:  WBproductModel::updateWBproductModel()
usedby:  WBcurrency::updateWBcurrency()
usedby:  WBcompany::updateWBcompany()
usedby:  WBactivityLog::updateWBactivityLog()
usedby:  WBapplication::updateWBapplication()
usedby:  WBproductRange::updateWBproductRange()
usedby:  WBcountry::updateWBcountryISO()
usedby:  WBprofile::updateWBprofile()
usedby:  WBsubZone::updateWBsubZone()
usedby:  WBuser::updateWBuser()
usedby:  WBzone::updateWBzone()
usedby:  WBreportFamily::updateWBreportFamily()
usedby:  WBreport::updateWBreport()
usedby:  WBprofiledUser::updateWBprofiledUser()
usedby:  WBprofiledUserSetting::updateWBprofiledUserSetting()
usedby:  WBregion::updateWBregion()
usedby:  TSperiodType::updateTSperiodType()
usedby:  TSperiod::updateTSperiod()
usedby:  SOstatus::updateSOstatus()
usedby:  SOtype::updateSOtype()
usedby:  SPcycle::updateSPcycle()
usedby:  SOheader::updateSOheader()
usedby:  Link_WBprofiledUser_WBmarket::updateLink_WBprofiledUser_WBmarket()
uses:  MySQL::UpdateRow()
usedby:  Link_WBcurrency_WBcountry::updateLink_WBcurrency_WBcountry()
usedby:  Link_WBmarket_WBcountry::updateLink_WBmarket_WBcountry()
usedby:  SPcycleType::updateSPcycleType()
usedby:  SPitem::updateSPitem()
usedby:  TSbucketSet::updateTSbucketSet()
usedby:  TShorizon::updateTShorizon()
usedby:  TShorizonType::updateTShorizonType()
usedby:  TSbucket::updateTSbucket()
usedby:  SPstatus::updateSPstatus()
usedby:  SPitemSet::updateSPitemSet()
usedby:  SPitemType::updateSPitemType()
usedby:  SPsetup::updateSPcycle()
usedby:  TSperiodMatch::updateTSperiodMatch()


Parameters:

string   $this->database   database name (required)
string   $this->table   table name (required)
string   $sIDrow   name of the ID row (required)
int   $this->$sIDrow   value of the ID (required)
array   $aRowsValues   associative array containing values for update (required)

[ Top ]


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