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

Class: LibertyStars

Source Location: d:\website\PhpDocumentor\/stars/LibertyStars.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyStars

Liberty Stars


Variables

Methods


Inherited Variables

Inherited Methods

Class: LibertyBase

LibertyBase::LibertyBase()
Constructor building on BitBase object
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::debug()
Switch debug level in database
BitBase::display()
This method should be THE method used to display a template. php files should not access $gBitSmarty directly.
BitBase::getDb()
Return pointer to current Database
BitBase::getField()
Returns entry from the mInfo hash if field exists
BitBase::isDatabaseValid()
Determines if there is a valide database connection
BitBase::prepGetList()
Prepares parameters with default values for any getList function
BitBase::setDatabase()
Sets database mechanism for the instance
BitBase::verifyId()
Determines if any given variable exists and is a number

Class Details

[line 20]
Liberty Stars



[ Top ]


Class Variables

$mContentId =

[line 21]


Type:   mixed


[ Top ]



Class Methods


constructor LibertyStars [line 30]

void LibertyStars( [array $pContentId = NULL])

Initiate Liberty Stars



Tags:

access:  public


Parameters:

array   $pContentId   Content id of the item being rated

[ Top ]

method calculateRating [line 376]

TRUE calculateRating( &$pParamHash, array $pParamHash)

Calculate the correct value to insert into the database



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pParamHash  
   &$pParamHash  

[ Top ]

method calculateUserWeight [line 420]

TRUE calculateUserWeight( [array $pUserId = NULL])

Calculate the importance of a users rating



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pUserId   User id

[ Top ]

method expunge [line 303]

TRUE expunge( )

This function removes a stars entry



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method getList [line 66]

array getList( $pListHash &$pListHash, $pListHash[sort_mode] 1, $pListHash[find] 2, $pListHash[max_records] 3, $pListHash[offset] 4)

get list of all rated content



Tags:

return:  of rated content
access:  public


Parameters:

$pListHash[sort_mode]   1   column and orientation by which search results are sorted
$pListHash[find]   2   search for a pigeonhole title - case insensitive
$pListHash[max_records]   3   maximum number of rows to return
$pListHash[offset]   4   number of results data is offset by
$pListHash   &$pListHash   contains array of items used to limit search results

[ Top ]

method getRatingSummary [line 170]

usable getRatingSummary( [array $pContentId = NULL])

Quick method to get a nice summary of past ratings for a given content



Tags:

return:  hash with a summary of ratings of a given content id
access:  public


Parameters:

array   $pContentId  

[ Top ]

method getUserRating [line 268]

TRUE getUserRating( [array $pContentId = NULL])

Get the rating of the currently active user for the specified content



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters:

array   $pContentId  

[ Top ]

method isValid [line 293]

TRUE isValid( )

Check if the mContentId is set and valid



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method load [line 41]

TRUE load( )

Load the data from the database



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method loadRatingDetails [line 140]

TRUE loadRatingDetails( boolean $pExtras)

Get the rating history of a loaded content



Tags:

return:  on success, FALSE on failure
access:  public


Parameters:

boolean   $pExtras   loading the extras will get all users who have rated in the past and their ratings

[ Top ]

method reCalculateRating [line 323]

TRUE reCalculateRating( )

recalculate the rating of all objects - important when user changes weighting opions TODO: add some check to see if this was successfull, currenlty only returns true



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


[ Top ]

method store [line 202]

bool store( array &$pParamHash)



Tags:

return:  TRUE on success, FALSE if store could not occur. If FALSE, $this->mErrors will have reason why
access:  public


Parameters:

array   &$pParamHash   pParams hash of values that will be used to store the page

[ Top ]


Documentation generated on Thu, 15 Feb 2007 20:42:35 +0000 by phpDocumentor 1.3.0