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

Class: SPitemType

Source Location: /SPitemType.php

Class Overview

WBobject
   |
   --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.


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 32]
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.

Created on 06 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()

[line 75]

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

[line 70]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$spItemTypeCategory =

[line 59]

Variable that contains item type category



Tags:

access:  public

Type:   string


[ Top ]

$spItemTypeElement =

[line 64]

Variable that contains item type element



Tags:

access:  public

Type:   string


[ Top ]

$spItemTypeID =

[line 49]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$spItemTypeName =

[line 54]

Variable that contains item type name



Tags:

access:  public

Type:   string


[ Top ]

$table =  "SPitemType"

[line 43]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createSPitemType [line 115]

object created createSPitemType( string $this->spItemTypeName, string $this->spItemTypeCategory, string $this->spItemTypeElement)

SPitemType object creation function

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

  1.  <?php
  2.  $aVars       array(
  3.       "spItemTypeName" => "fooName",
  4.       "spItemTypeCategory" => "barCategory",
  5.       "spItemTypeElement" => "barElement"
  6.  );
  7.  $oSPitemType new SPitemType($aVars);
  8.  echo $oSPitemType->createSPitemType()->spItemTypeID;
  9.  // itemtypeID
  10.  ?>




Tags:

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


Parameters:

string   $this->spItemTypeName   name of the item type (required)
string   $this->spItemTypeCategory   category of the item type (required)
string   $this->spItemTypeElement   element of the item type (required)

[ Top ]

method deleteSPitemType [line 285]

bool deleteSPitemType( int $this->spItemTypeID)

SPitemType object deletion function

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

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

[ Top ]

method getSPitemType [line 327]

object SPitemType getSPitemType( int $this->spItemTypeID)

SPitemType object obtention function

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

  1.  <?php
  2.  $aVars       array("spItemTypeID" => 12);
  3.  $oSPitemType new SPitemType($aVars);
  4.  echo $oSPitemType->getSPitemType()->spItemTypeName;
  5.  // fooName
  6.  ?>




Tags:

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


Parameters:

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

[ Top ]

method updateSPitemType [line 198]

object updated updateSPitemType( int $this->spItemTypeID, string $this->spItemTypeName, string $this->spItemTypeCategory, string $this->spItemTypeElement)

SPitemType object update function

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

  1.  <?php
  2.  $aVars       array(
  3.       "spItemTypeID" => 12,
  4.       "spItemTypeName" => "fooName",
  5.       "spItemTypeCategory" => "barCategory",
  6.       "spItemTypeElement" => "fooElement"
  7.  );
  8.  $oSPitemType new SPitemType($aVars);
  9.  echo $oSPitemType->updateSPitemType()->spItemTypeID;
  10.  // 12
  11.  ?>




Tags:

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


Parameters:

int   $this->spItemTypeID   ID of the item type to be updated (required)
string   $this->spItemTypeName   name of the item type (required)
string   $this->spItemTypeCategory   category of the item type (required)
string   $this->spItemTypeElement   element of the item type (required)

[ Top ]


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