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

Class: SPcycle

Source Location: /SPcycle.php

Class Overview

WBobject
   |
   --SPcycle

This class manages SPcycle objects. Reference to one planning cyclic exercise of a given Market.


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 31]
This class manages SPcycle objects. Reference to one planning cyclic exercise of a given Market.

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(
        "spCycleReferencePeriod"    =>  "TSperiod",
        "spCyclePattern"            =>  "SPcycleType",
        "spCycleSetup"              =>  "SPsetup",
        "spCycleStatus"             =>  "SPstatus"
    )

[line 114]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 37]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "spCycleID"

[line 109]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$spCycleConfirmedTS =

[line 98]

Variable that contains date of confirmation of the cycle (timestamp)



Tags:

access:  public

Type:   int


[ Top ]

$spCycleEndedTS =

[line 103]

Variable that contains date of when the cycle has been closed (timestamp)



Tags:

access:  public

Type:   int


[ Top ]

$spCycleID =

[line 48]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$spCyclePattern =

[line 63]

Variable that contains pattern object



Tags:

access:  public

Type:   object


[ Top ]

$spCyclePatternID =

[line 68]

Variable that contains pattern ID



Tags:

access:  public

Type:   int


[ Top ]

$spCycleReferencePeriod =

[line 53]

Variable that contains reference period object



Tags:

access:  public

Type:   object


[ Top ]

$spCycleReferencePeriodID =

[line 58]

Variable that contains reference period ID



Tags:

access:  public

Type:   int


[ Top ]

$spCycleSetup =

[line 73]

Variable that contains setup object



Tags:

access:  public

Type:   object


[ Top ]

$spCycleSetupID =

[line 78]

Variable that contains setup ID



Tags:

access:  public

Type:   int


[ Top ]

$spCycleStartedTS =

[line 93]

Variable that contains date of start of the cycle (timestamp)



Tags:

access:  public

Type:   int


[ Top ]

$spCycleStatus =

[line 83]

Variable that contains status object



Tags:

access:  public

Type:   object


[ Top ]

$spCycleStatusID =

[line 88]

Variable that contains status ID



Tags:

access:  public

Type:   int


[ Top ]

$table =  "SPcycle"

[line 42]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createSPcycle [line 161]

object created createSPcycle( object $this->spCycleReferencePeriod, object $this->spCyclePattern, object $this->spCycleSetup, object $this->spCycleStatus)

SPcycle object creation function

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

  1.  <?php
  2.  $aVars    array(
  3.       "spCycleReferencePeriod" => $oTSperiod,
  4.       "spCyclePattern" => $oSPcycleType,
  5.       "spCycleSetup" => $oSPsetup,
  6.       "spCycleStatus" => $oSPstatus);
  7.  $oSPcycle new SPcycle($aVars);
  8.  echo $oSPcycle->createSPcycle()->spCycleID;
  9.  // cycleID
  10.  ?>




Tags:

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


Parameters:

object   $this->spCycleReferencePeriod   reference period (required)
object   $this->spCyclePattern   type of cycles (required)
object   $this->spCycleSetup   referencing setup (required)
object   $this->spCycleStatus   status of the cycle (required)

[ Top ]

method deleteSPcycle [line 367]

bool deleteSPcycle( int $this->spCycleID)

SPcycle object deletion function

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

  1.  <?php
  2.  $aVars    array("spCycleID" => 12);
  3.  $oSPcycle new SPcycle($aVars);
  4.  echo $oSPcycle->deleteSPcycle();
  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->spCycleID   ID of the item type to be deleted (required)

[ Top ]

method getSPcycle [line 408]

object SPcycle getSPcycle( int $this->spCycleID)

SPcycle object obtention function

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

  1.  <?php
  2.  $aVars    array("spCycleID" => 12);
  3.  $oSPcycle new SPcycle($aVars);
  4.  echo $oSPcycle->getSPcycle()->spCycleStatus->spStatusName;
  5.  // fooName
  6.  ?>




Tags:

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


Parameters:

int   $this->spCycleID   ID of the cycle to get (required)

[ Top ]

method updateSPcycle [line 264]

object updated updateSPcycle( int $this->spCycleID, object $this->spCycleReferencePeriod, object $this->spCyclePattern, object $this->spCycleSetup, object $this->spCycleStatus)

SPcycle object update function

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

  1.  <?php
  2.  $aVars    array(
  3.       "spCycleID" => 12,
  4.       "spCycleReferencePeriod" => $oTSperiod,
  5.       "spCyclePattern" => $oSPcycleType,
  6.       "spCycleSetup" => $oSPsetup,
  7.       "spCycleStatus" => $oSPstatus
  8.  );
  9.  $oSPcycle new SPcycle($aVars);
  10.  echo $oSPcycle->updateSPcycle()->spCycleID;
  11.  // 12
  12.  ?>




Tags:

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


Parameters:

int   $this->spCycleID   ID of the cycle to be updated (required)
object   $this->spCycleReferencePeriod   reference period (required)
object   $this->spCyclePattern   cycle pattern (required)
object   $this->spCycleSetup   cycle setup (required)
object   $this->spCycleStatus   cycle status (required)

[ Top ]


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