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

Class: SPsetup

Source Location: /SPsetup.php

Class Overview

WBobject
   |
   --SPsetup

This class manages SPsetup objects. Planning settings that describe both the planning and the planned network.


Author(s):

Version:

  • 1.1

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 30]
This class manages SPsetup objects. Planning settings that describe both the planning and the planned network.

Created on 07 jul 09

Changes: 1.0 -> 1.1: 14 jul 09 updated: file is PEAR compatible




Tags:

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


[ Top ]


Class Variables

$aObjects = array(
        "spSetupCurrentMperiod" => "TSperiod", 
        "spSetupCurrentYperiod" => "TSperiod", 
        "spSetupMarket"         => "WBmarket"
        )

[line 124]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 36]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "spSetupID"

[line 119]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$spSetupCurrentMperiod =

[line 53]

Variable that contains reference to the period of the active

monthly cycle (object)




Tags:

access:  public

Type:   object


[ Top ]

$spSetupCurrentMperiodID =

[line 59]

Variable that contains reference to the period of the active

monthly cycle (ID)




Tags:

access:  public

Type:   int


[ Top ]

$spSetupCurrentYperiod =

[line 65]

Variable that contains reference to the period of the active

yearly cycle (object)




Tags:

access:  public

Type:   object


[ Top ]

$spSetupCurrentYperiodID =

[line 71]

Variable that contains reference to the period of the active

yearly cycle (ID)




Tags:

access:  public

Type:   int


[ Top ]

$spSetupCustomsLeadtime =

[line 107]

Variable that contains number of days required from ETA to the day of 

reception at customer 's premises (including customs' clearance, local  transportation and, if applicable, local administration)




Tags:

access:  public

Type:   int


[ Top ]

$spSetupID =

[line 47]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$spSetupLoadBatch =

[line 94]

Variable that contains reference number for representing the size of  an optimized load, which should correspond to a full order.



Tags:

access:  public

Type:   int


[ Top ]

$spSetupMarket =

[line 76]

Variable that contains concerned market (object)



Tags:

access:  public

Type:   object


[ Top ]

$spSetupMarketID =

[line 81]

Variable that contains concerned market (ID)



Tags:

access:  public

Type:   int


[ Top ]

$spSetupMaxBacklog =

[line 113]

Variable that contains number of days during which a delay in supply 

can be recovered and does not affect the deployment targets




Tags:

access:  public

Type:   int


[ Top ]

$spSetupModelBatch =

[line 88]

Variable that contains batch size for orders of such model.  Orders have to be consolidated in multiples of that number.



Tags:

access:  public

Type:   int


[ Top ]

$spSetupModelLoadShare =

[line 100]

Variable that contains share of the optimum load that is represented  by one batch of model.



Tags:

access:  public

Type:   int


[ Top ]

$table =  "SPsetup"

[line 41]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createSPsetup [line 201]

object created createSPsetup( object $this->spSetupCurrentMperiod, object $this->spSetupMarket, int $this->spSetupModelBatch, int $this->spSetupLoadBatch, int $this->spSetupModelLoadShare, int $this->spSetupTransitLeadtime, int $this->spSetupCustomsLeadtime)

SPsetup object creation function

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

  1.  <?php
  2.  $aVars           array(
  3.       "spSetupCurrentMperiod"     =>  $oTSperiod1,
  4.       "spSetupCurrentYperiod"     =>  $oTSperiod2,
  5.       "spSetupMarket"             =>  $oWBmarket,
  6.       "spSetupModelBatch"         =>  $iModelBatch,
  7.       "spSetupModelLoadShare"     =>  $iModelLoadShare,
  8.       "spSetupCustomsLeadtime"    =>  $iCustomsLeadtime,
  9.       "spSetupMaxBacklog"         =>  $iMaxBacklog
  10.  );
  11.  $oSPsetup    new SPsetup($aVars);
  12.  echo $oSPsetup->createSPsetup()->spSetupID;
  13.  // setupID
  14.  ?>




Tags:

return:  object or false
since:  version 1.0
uses:  WBobject::addToDB()
uses:  TSperiod
uses:  WBmarket


Parameters:

object   $this->spSetupCurrentMperiod   reference yearly period (required)
object   $this->spSetupMarket   market concerned (required)
int   $this->spSetupModelBatch   models that will be part of the plans (required)
int   $this->spSetupLoadBatch   reference number of reprensenting the size of an optimized load (required)
int   $this->spSetupModelLoadShare   Share of the optimum  load that is  represented by  one batch of  model (required)
int   $this->spSetupTransitLeadtime   Number of days required  from the day of  departure to the  day of reception  at customer's  premises (required)
int   $this->spSetupCustomsLeadtime   Number of days required  from ETA to the day  of reception at  customer's premises  (including customs'  clearance, local  transportation and,  if applicable,  local administration) (required)

[ Top ]

method deleteSPsetup [line 546]

bool deleteSPsetup( int $this->spSetupID)

SPsetup object deletion function

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

  1.  <?php
  2.  $aVars    array("spSetupID" => 12);
  3.  $oSPsetup new SPsetup($aVars);
  4.  echo $oSPsetup->deleteSPsetup();
  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->spSetupID   ID of the setup to be deleted (required)

[ Top ]

method getSPsetup [line 589]

object SPsetup getSPsetup( int $this->spSetupID)

SPsetup object obtention function

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

  1.  <?php
  2.  $aVars               array("spSetupID" => 12);
  3.  $oSPsetup            new SPsetup($aVars);
  4.  echo $oSPsetup->getSPsetup()->spSetupModelBatch;
  5.  // 12
  6.  ?>




Tags:

return:  object
since:  Version 1.0
uses:  WBobject::getUniqueFromDB()
uses:  TSperiod::getTSperiod()
uses:  WBmarket::getWBmarket()


Parameters:

int   $this->spSetupID   ID of the setup to get (required)

[ Top ]

method updateSPcycle [line 390]

object created updateSPcycle( int $this->spSetupID, object $this->spSetupCurrentMperiod, object $this->spSetupMarket, int $this->spSetupModelBatch, int $this->spSetupLoadBatch, int $this->spSetupModelLoadShare, int $this->spSetupTransitLeadtime, int $this->spSetupCustomsLeadtime)

SPsetup object update function

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

  1.  <?php
  2.  $aVars           array(
  3.       "spSetupID"                 =>  $iSetupID,
  4.       "spSetupCurrentMperiod"     =>  $oTSperiod1,
  5.       "spSetupCurrentYperiod"     =>  $oTSperiod2,
  6.       "spSetupMarket"             =>  $oWBmarket,
  7.       "spSetupModelBatch"         =>  $iModelBatch,
  8.       "spSetupModelLoadShare"     =>  $iModelLoadShare,
  9.       "spSetupCustomsLeadtime"    =>  $iCustomsLeadtime,
  10.       "spSetupMaxBacklog"         =>  $iMaxBacklog
  11.  );
  12.  $oSPsetup    new SPsetup($aVars);
  13.  echo $oSPsetup->updateSPsetup()->spSetupID;
  14.  // setupID
  15.  ?>




Tags:

return:  object or false
since:  version 1.0
uses:  WBobject::updateDB()
uses:  TSperiod
uses:  WBmarket


Parameters:

int   $this->spSetupID   ID of the SPsetup to be updated (required)
object   $this->spSetupCurrentMperiod   reference yearly period (required)
object   $this->spSetupMarket   market concerned (required)
int   $this->spSetupModelBatch   models that will be part of the plans (required)
int   $this->spSetupLoadBatch   reference number of reprensenting the size of an optimized load (required)
int   $this->spSetupModelLoadShare   Share of the optimum  load that is  represented by  one batch of  model (required)
int   $this->spSetupTransitLeadtime   Number of days required  from the day of  departure to the  day of reception  at customer's  premises (required)
int   $this->spSetupCustomsLeadtime   Number of days required  from ETA to the day  of reception at  customer's premises  (including customs'  clearance, local  transportation and,  if applicable,  local administration) (required)

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:42 +0200 by phpDocumentor 1.4.1