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

Class: TSbucket

Source Location: /TSbucket.php

Class Overview

WBobject
   |
   --TSbucket

This class manages TSbucket objects. Information linked to a specific period.


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 TSbucket objects. Information linked to a specific period.

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(
        "tsBucketPeriod" => "TSperiod")

[line 73]

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

[line 68]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "TSbucket"

[line 41]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$tsBucketID =

[line 47]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$tsBucketPeriod =

[line 52]

Variable that contains bucket period object



Tags:

access:  public

Type:   object


[ Top ]

$tsBucketPeriodID =

[line 57]

Variable that contains bucket period ID



Tags:

access:  public

Type:   int


[ Top ]

$tsBucketValue =

[line 62]

Variable that contains bucket value



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createTSbucket [line 107]

object created createTSbucket( object $this->tsBucketPeriod, int $this->tsBucketValue)

TSbucket object creation function

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

  1.  <?php
  2.  $aVars     array("tsBucketPeriod" => $oTSperiod,
  3.      "tsBucketValue" => 123);
  4.  $oTSbucket new TSbucket($aVars);
  5.  echo $oTSbucket->createTSbucket()->tsBucketID;
  6.  // bucketID
  7.  ?>




Tags:

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


Parameters:

object   $this->tsBucketPeriod   bucket period (required)
int   $this->tsBucketValue   bucket value (required)

[ Top ]

method deleteTSbucket [line 252]

bool deleteTSbucket( int $this->tsBucketID)

TSbucket object deletion function

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

  1.  <?php
  2.  $aVars                array("tsBucketID" => 12);
  3.  $oTSbucket            new TSbucket($aVars);
  4.  echo $oTSbucket->deleteTSbucket();
  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->tsBucketID   ID of the bucket to be deleted (required)

[ Top ]

method getTSbucket [line 293]

object TSbucket getTSbucket( int $this->tsBucketID)

TSbucket object obtention function

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

  1.  <?php
  2.  $aVars                array("tsBucketID" => 12);
  3.  $oTSbucket            new TSbucket($aVars);
  4.  echo $oTSbucket->getTSbucket()->tsBucketValue;
  5.  // 123
  6.  ?>




Tags:

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


Parameters:

int   $this->tsBucketID   ID of the bucket to get (required)

[ Top ]

method updateTSbucket [line 179]

object updated updateTSbucket( int $this->tsBucketID, object $this->tsBucketPeriod, int $this->tsBucketValue)

TSbucket object update function

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

  1.  <?php
  2.  $aVars      array("tsBucketID" => 12"tsBucketPeriod" => $oTSperiod,
  3.      "tsBucketValue" => 123);
  4.  $oTSbucket  new TSbucket($aVars);
  5.  echo $oTSbucket->updateTSbucket()->tsBucketID;
  6.  // 12
  7.  ?>




Tags:

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


Parameters:

int   $this->tsBucketID   ID of the bucket (required)
object   $this->tsBucketPeriod   bucket period (required)
int   $this->tsBucketValue   bucket value (required)

[ Top ]


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