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

Class: TShorizonType

Source Location: /TShorizonType.php

Class Overview

WBobject
   |
   --TShorizonType

This class manages TShorizonType objects. Type of horizons available with rules for naming and horizon 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 30]
This class manages TShorizonType objects. Type of horizons available with rules for naming and horizon definition.

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(
        "tsHorizonTypePeriod" => "TSperiodType")

[line 88]

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

[line 83]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "TShorizonType"

[line 41]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$tsHorizonTypeAlias =

[line 77]

Variable that contains alias of the horizon type



Tags:

access:  public

Type:   string


[ Top ]

$tsHorizonTypeDescription =

[line 57]

Variable that contains description of the horizon type



Tags:

access:  public

Type:   string


[ Top ]

$tsHorizonTypeID =

[line 47]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$tsHorizonTypeLength =

[line 72]

Variable that contains number of periods used



Tags:

access:  public

Type:   int


[ Top ]

$tsHorizonTypePeriod =

[line 62]

Variable that contains period type of the horizon type (object)



Tags:

access:  public

Type:   object


[ Top ]

$tsHorizonTypePeriodID =

[line 67]

Variable that contains period type of the horizon type (ID)



Tags:

access:  public

Type:   int


[ Top ]

$tsHorizonTypeShort =

[line 52]

Variable that contains short name of horizon type



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method createTShorizonType [line 135]

object created createTShorizonType( string $this->tsHorizonTypeShort, string $this->tsHorizonTypeDescription, object $this->tsHorizonTypePeriod, int $this->tsHorizonTypeLength, string $this->tsHorizonTypeAlias)

TShorizonType object creation function

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

  1.  <?php
  2.  $aVars          array(
  3.       "tsHorizonTypeShort" => "fooShort",
  4.       "tsHorizonTypeDescription" => "barDescription",
  5.       "tsHorizonTypePeriod" => $oTSperiodType,
  6.       "tsHorizonTypeLength" => "12",
  7.       "tsHorizonTypeAlias" => "fooAlias"
  8.  );
  9.  $oTShorizonType new TShorizonType($aVars);
  10.  echo $oTShorizonType->createTShorizonType()->tsHorizonTypeID;
  11.  // horizonID
  12.  ?>




Tags:

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


Parameters:

string   $this->tsHorizonTypeShort   short name of the horizon type (required)
string   $this->tsHorizonTypeDescription   description of the horizon type (required)
object   $this->tsHorizonTypePeriod   period used (required)
int   $this->tsHorizonTypeLength   length of horizon (required)
string   $this->tsHorizonTypeAlias   alias of the horizon type (required)

[ Top ]

method deleteTShorizonType [line 372]

bool deleteTShorizonType( int $this->tsHorizonTypeID)

TShorizonType object deletion function

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

  1.  <?php
  2.  $aVars          array("tsHorizonTypeID" => 12);
  3.  $oTShorizonType new TShorizonType($aVars);
  4.  echo $oTShorizonType->deleteTShorizonType();
  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->tsHorizonTypeID   ID of the horizon type to be deleted (required)

[ Top ]

method getTShorizonType [line 414]

object TShorizonType getTShorizonType( int $this->tsHorizonTypeID)

TShorizonType object obtention function

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

  1.  <?php
  2.  $aVars                array("tsHorizonTypeID" => 12);
  3.  $oTShorizonType       new TShorizonType($aVars);
  4.  echo $oTShorizonType->getTShorizonType()->tsHorizonTypeName;
  5.  // fooName
  6.  ?>




Tags:

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


Parameters:

int   $this->tsHorizonTypeID   ID of the horizon type to get (required)

[ Top ]

method updateTShorizonType [line 255]

object updated updateTShorizonType( int $this->tsHorizonTypeID, string $this->tsHorizonTypeShort, string $this->tsHorizonTypeDescription, object $this->tsHorizonTypePeriod, int $this->tsHorizonTypeLength, string $this->tsHorizonTypeAlias)

TShorizonType object update function

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

  1.  <?php
  2.  $aVars          array(
  3.       "tsHorizonTypeID" => 12,
  4.       "tsHorizonTypeShort" => "fooShort",
  5.       "tsHorizonTypeDescription" => "barDescription",
  6.       "tsHorizonTypePeriod" => $oTSperiodType,
  7.       "tsHorizonTypeLength" => 12,
  8.       "tsHorizonTypeAlias" => "fooAlias"
  9.  s);
  10.  $oTShorizonType new TShorizonType($aVars);
  11.  echo $oTShorizonType->updateTShorizonType()->tsHorizonTypeID;
  12.  // 12
  13.  ?>




Tags:

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


Parameters:

int   $this->tsHorizonTypeID   ID of the horizon type to be updated (required)
string   $this->tsHorizonTypeShort   short name of the horizon type (required)
string   $this->tsHorizonTypeDescription   description of the horizon type (required)
object   $this->tsHorizonTypePeriod   period of the horizon type (required)
int   $this->tsHorizonTypeLength   length of the horizon type (required)
string   $this->tsHorizonTypeAlias   alias of the horizon type (required)

[ Top ]


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