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

Class: TSperiodType

Source Location: /TSperiodType.php

Class Overview

WBobject
   |
   --TSperiodType

This class manages TSperiodType objects. Types of periods available with rules for naming and period definition.


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 TSperiodType objects. Types of periods available with rules for naming and period definition.

Created on 07 jul 09

Changes: 1.0 -> 1.1: 10 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 79]

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

[line 74]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "TSperiodType"

[line 42]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$tsPeriodTypeAlias =

[line 68]

Variable that contains alias of the time period



Tags:

access:  public

Type:   string


[ Top ]

$tsPeriodTypeCode =

[line 63]

Variable that contains code of the time period



Tags:

access:  public

Type:   char


[ Top ]

$tsPeriodTypeDescription =

[line 58]

Variable that contains description of the time period



Tags:

access:  public

Type:   string


[ Top ]

$tsPeriodTypeID =

[line 48]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$tsPeriodTypeShort =

[line 53]

Variable that contains short name of the time period



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createTSperiodType [line 120]

object created createTSperiodType( string $this->tsPeriodTypeShort, string $this->tsPeriodTypeDescription, char $this->tsPeriodTypeCode, string $this->tsPeriodTypeAlias)

TSperiodType object creation function

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

  1.  <?php
  2.  $aVars         array("tsPeriodTypeShort" => "fooType",
  3.      "tsPeriodTypeDescription" => "barDescription",
  4.      "tsPeriodTypeCode" => "a",
  5.      "tsPeriodTypeAlias" => "barAlias");
  6.  $oTSperiodType new TSperiodType($aVars);
  7.  echo $oTSperiodType->createTSperiodType()->tsPeriodTypeID;
  8.  // periodtypeID
  9.  ?>




Tags:

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


Parameters:

string   $this->tsPeriodTypeShort   short form of period type (required)
string   $this->tsPeriodTypeDescription   description of period type (required)
char   $this->tsPeriodTypeCode   code of the period type (required)
string   $this->tsPeriodTypeAlias   alias of the period type (required)

[ Top ]

method deleteTSperiodType [line 325]

bool deleteTSperiodType( int $this->tsPeriodTypeID)

TSperiodType object deletion function

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

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

[ Top ]

method getTSperiodType [line 367]

object TSperiodType getTSperiodType( int $this->tsPeriodTypeID)

TSperiodType object obtention function

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

  1.  <?php
  2.  $aVars                array("tsPeriodTypeID" => 12);
  3.  $oTSperiodType        new TSperiodType($aVars);
  4.  echo $oTSperiodType->getTSperiodType()->tsPeriodTypeShort;
  5.  // fooShort
  6.  ?>




Tags:

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


Parameters:

int   $this->tsPeriodTypeID   ID of the period type to get (required)

[ Top ]

method updateTSperiodType [line 224]

object updated updateTSperiodType( int $this->tsPeriodTypeID, string $this->tsPeriodTypeShort, string $this->tsPeriodTypeDescription, char $this->tsPeriodTypeCode, string $this->tsPeriodTypeAlias)

TSperiodType object update function

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

  1.  <?php
  2.  $aVars         array(
  3.      "tsPeriodTypeID" => 12,
  4.      "tsPeriodTypeShort" => "fooShort",
  5.      "tsPeriodTypeDescription" => "barDescription",
  6.      "tsPeriodTypeCode" => "a",
  7.      "tsPeriodTypeAlias" => "fooAlias"
  8.  );
  9.  $oTSperiodType new TSperiodType($aVars);
  10.  echo $oTSperiodType->updateTSperiodType()->tsPeriodTypeID;
  11.  // 12
  12.  ?>




Tags:

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


Parameters:

int   $this->tsPeriodTypeID   ID of the period type to be updated (required)
string   $this->tsPeriodTypeShort   short name of the period (required)
string   $this->tsPeriodTypeDescription   description of the period type (required)
char   $this->tsPeriodTypeCode   code of the period type (required)
string   $this->tsPeriodTypeAlias   alias of the period type (required)

[ Top ]


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