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

Class: LibertyStars

Source Location: /stars/LibertyStars.php

Class Overview

BitBase
   |
   --LibertyBase
      |
      --LibertyStars

Liberty Stars


Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: LibertyBase

LibertyBase::__construct()
Constructor building on BitBase object
LibertyBase::getLibertyClass()
given a content_type_guid this will return an object of the proper type
LibertyBase::getLibertyObject()
Given a content_id, this will return and object of the proper type
LibertyBase::getNewObject()
Simple method to create a given class with a specified content_id. The purpose of a method is to allow for derived classes to override as necessary.
LibertyBase::getNewObjectById()
Simple method to create a given class with a specified primary_id. The purpose of a method is to allow for derived classes to override as necessary.

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::__construct()
BitBase::clearFromCache()
BitBase::expunge()
Delete content object and all related records
BitBase::load()
BitBase::__destruct()

Class Details

[line 20]
Liberty Stars



[ Top ]


Class Variables

$mContentId =

[line 21]


Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 30]

void __construct( [array $pContentId = NULL])

Initiate Liberty Stars



Tags:

access:  public


Overrides LibertyBase::__construct() (Constructor building on BitBase object)

Parameters:

array   $pContentId   Content id of the item being rated

[ Top ]

method calculateRating [line 379]

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 423]

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 306]

TRUE expunge( )

This function removes a stars entry



Tags:

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


Overrides BitBase::expunge() (Delete content object and all related records)

[ 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 173]

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 271]

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 296]

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


Overrides BitBase::load() (parent method not documented)

[ Top ]

method loadRatingDetails [line 143]

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 326]

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 205]

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 Wed, 29 Jul 2015 13:56:57 +0000 by phpDocumentor 1.5.0-lsces