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

Class: SPitem

Source Location: /SPitem.php

Class Overview

WBobject
   |
   --SPitem

This class manages SPitem objects. An element that needs to be planned (updated / calculated) in a given planning cycle.


Author(s):

Version:

  • 1.2

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 32]
This class manages SPitem objects. An element that needs to be planned (updated / calculated) in a given planning cycle.

Created on 06 jul 09

Changes: 1.1 -> 1.2: 10 aug 09 updated: getSPitem() function gets now subobjects 1.0 -> 1.1: 14 jul 09 updated: file is PEAR compatible




Tags:

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


[ Top ]


Class Variables

$aObjects = array(
        "spItemCycle"   =>  "SPcycle",
        "spItemPattern" =>  "SPitemType",
        "spItemStatus"  =>  "SPstatus"
    )

[line 90]

Variable that contains objects list



Tags:

access:  protected

Type:   array


[ Top ]

$database =  "prysma"

[line 38]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$sIDrowname =  "spItemID"

[line 85]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$spItemCycle =

[line 54]

Variable that contains item cycle object



Tags:

access:  public

Type:   object


[ Top ]

$spItemCycleID =

[line 59]

Variable that contains item cycle ID



Tags:

access:  public

Type:   int


[ Top ]

$spItemID =

[line 49]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$spItemPattern =

[line 64]

Variable that contains item pattern object



Tags:

access:  public

Type:   object


[ Top ]

$spItemPatternID =

[line 69]

Variable that contains item pattern ID



Tags:

access:  public

Type:   int


[ Top ]

$spItemStatus =

[line 74]

Variable that contains item status object



Tags:

access:  public

Type:   object


[ Top ]

$spItemStatusID =

[line 79]

Variable that contains item status ID



Tags:

access:  public

Type:   int


[ Top ]

$table =  "SPitem"

[line 43]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createSPitem [line 130]

object created createSPitem( object $this->spItemCycle, object $this->spItemPattern, object $this->spItemStatus)

SPitem object creation function

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

  1.  <?php
  2.  $aVars   array(
  3.       "spItemCycle" => $oSPcycle,
  4.       "spItemPattern" => $oSPitemType,
  5.       "spItemStatus" => $oSPstatus);
  6.  $oSPitem new SPitem($aVars);
  7.  echo $oSPitem->createSPitem()->spItemID;
  8.  // itemID
  9.  ?>




Tags:

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


Parameters:

object   $this->spItemCycle   item cycle (required)
object   $this->spItemPattern   item pattern (required)
object   $this->spItemStatus   item status (required)

[ Top ]

method deleteSPitem [line 299]

bool deleteSPitem( int $this->spItemID)

SPitem object deletion function

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

  1.  <?php
  2.  $aVars                array("spItemID" => 12);
  3.  $oSPitem              new SPitem($aVars);
  4.  echo $oSPitem->deleteSPitem();
  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->spItemID   ID of the item to be deleted (required)

[ Top ]

method getSPitem [line 340]

object SPitem getSPitem( int $this->spItemID)

SPitem object obtention function

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

  1.  <?php
  2.  $aVars   array("spItemID" => 12);
  3.  $oSPitem new SPitem($aVars);
  4.  echo $oSPitem->getSPitem()->spItemStatus->spStatusName;
  5.  // fooName
  6.  ?>




Tags:

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


Parameters:

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

[ Top ]

method updateSPitem [line 212]

object updated updateSPitem( int $this->spItemID, object $this->spItemCycle, object $this->spItemPattern, object $this->spItemStatus)

SPitem object update function

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

  1.  <?php
  2.  $aVars   array(
  3.       "spItemID" => 12,
  4.       "spItemCycle" => $oSPcycle,
  5.       "spItemPattern" => $oSPitemType,
  6.       "spItemStatus" => $oSPstatus
  7.  );
  8.  $oSPitem new SPitem($aVars);
  9.  echo $oSPitem->updateSPitem()->spItemID;
  10.  // 12
  11.  ?>




Tags:

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


Parameters:

int   $this->spItemID   ID of the item to be updated (required)
object   $this->spItemCycle   cycle of the item (required)
object   $this->spItemPattern   pattern of the item (required)
object   $this->spItemStatus   status of the item (required)

[ Top ]


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