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

Class: TSperiodMatch

Source Location: /TSperiodMatch.php

Class Overview

WBobject
   |
   --TSperiodMatch

This class manages TSperiodMatch objects. Match between two periods to indicate the number common days.


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 TSperiodMatch objects. Match between two periods to indicate the number common days.

Created on 08 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("tsPeriodMatchSmall"=>"TSperiod","tsPeriodMatchLarge"=>"TSperiod")

[line 84]

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

[line 79]

Variable that contains ID rowname



Tags:

access:  protected

Type:   string


[ Top ]

$table =  "TSperiodMatch"

[line 42]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]

$tsPeriodMatchDays =

[line 73]

Variable that contains number of days that both periods have in common



Tags:

access:  public

Type:   int


[ Top ]

$tsPeriodMatchID =

[line 48]

Variable that contains object ID



Tags:

access:  public

Type:   int


[ Top ]

$tsPeriodMatchLarge =

[line 63]

Variable that contains reference to the large period object



Tags:

access:  public

Type:   object


[ Top ]

$tsPeriodMatchLargeID =

[line 68]

Variable that contains reference to the large period ID



Tags:

access:  public

Type:   int


[ Top ]

$tsPeriodMatchSmall =

[line 53]

Variable that contains reference to the small period object



Tags:

access:  public

Type:   object


[ Top ]

$tsPeriodMatchSmallID =

[line 58]

Variable that contains reference to the small period ID



Tags:

access:  public

Type:   int


[ Top ]



Class Methods


method createTSperiodMatch [line 120]

object created createTSperiodMatch( object $this->tsPeriodMatchSmall, object $this->tsPeriodMatchLarge, object $this->tsPeriodMatchDays)

TSperiodMatch object creation function

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

  1.  <?php
  2.  $aVars            array("tsPeriodMatchSmall" => $oTSperiod1,
  3.       "tsPeriodMatchLarge" => $oTSperiod2"tsPeriodMatchDays" => 123);
  4.  $oTSperiodMatch   new TSperiodMatch($aVars);
  5.  echo $oTSperiodMatch->createTSperiodMatch()->tsPeriodMatchID;
  6.  // periodmatchID
  7.  ?>




Tags:

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


Parameters:

object   $this->tsPeriodMatchSmall   reference to the small period (required)
object   $this->tsPeriodMatchLarge   reference to the large period (required)
object   $this->tsPeriodMatchDays   days in common (required)

[ Top ]

method deleteTSperiodMatch [line 295]

bool deleteTSperiodMatch( int $this->tsPeriodMatchID)

TSperiodMatch object deletion function

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

  1.  <?php
  2.  $aVars                array("tsPeriodMatchID" => 12);
  3.  $oTSperiodMatch       new TSperiodMatch($aVars);
  4.  echo $oTSperiodMatch->deleteTSperiodMatch();
  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->tsPeriodMatchID   ID of the period match to be deleted (required)

[ Top ]

method getTSperiodMatch [line 337]

object TSperiodMatch getTSperiodMatch( int $this->tsPeriodMatchID)

TSperiodMatch object obtention function

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

  1.  <?php
  2.  $aVars                array("tsPeriodMatchID" => 12);
  3.  $oTSperiodMatch       new TSperiodMatch($aVars);
  4.  echo $oTSperiodMatch->getTSperiodMatch()->tsPeriodMatchDays;
  5.  // 123
  6.  ?>




Tags:

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


Parameters:

int   $this->tsPeriodMatchID   ID of the period match to get (required)

[ Top ]

method updateTSperiodMatch [line 207]

object updated updateTSperiodMatch( int $this->tsPeriodMatchID, object $this->tsPeriodMatchSmall, object $this->tsPeriodMatchLarge, int $this->tsPeriodMatchDays)

TSperiodMatch object update function

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

  1.  <?php
  2.  $aVars          array("tsPeriodMatchID" => 12,
  3.       "tsPeriodMatchSmall" => $oTSperiod1,
  4.       "tsPeriodMatchLarge" => $oTSperiod2,
  5.       "tsPeriodMatchDays" => 123);
  6.  $oTSperiodMatch new TSperiodMatch($aVars);
  7.  echo $oTSperiodMatch->updateTSperiodMatch()->tsPeriodMatchID;
  8.  // 12
  9.  ?>




Tags:

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


Parameters:

int   $this->tsPeriodMatchID   ID of the period match to be updated (required)
object   $this->tsPeriodMatchSmall   small period (required)
object   $this->tsPeriodMatchLarge   large period (required)
int   $this->tsPeriodMatchDays   number of days (required)

[ Top ]


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