ultimix
rating_markup_1_0_0 Class Reference

Public Member Functions

 __construct ()
 compile_rating (&$Settings)

Data Fields

 $RatingAlgorithms = false

Detailed Description

Class processes macro.

Author
Dodonov A.A.

Definition at line 26 of file rating_markup.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 54 of file rating_markup.php.

{
try
{
$this->RatingAlgorithms = get_package( 'rating::rating_algorithms' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

compile_rating ( $Settings)

Function compiles macro 'rating'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 88 of file rating_markup.php.

{
try
{
$MasterId = $Settings->get_setting( 'master_id' );
$MasterType = $Settings->get_setting( 'master_type' , 'user' );
$Rating = $this->RatingAlgorithms->get_rating( $MasterId , $MasterType );
$ShowPrefix = intval( $Settings->get_setting( 'show_prefix' , 0 ) );
return( $ShowPrefix == 1 ? "{lang:rating}: $Rating" : $Rating );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$RatingAlgorithms = false

Cached packages.

Author
Dodonov A.A.

Definition at line 38 of file rating_markup.php.


The documentation for this class was generated from the following file: