PHP Class Rating\Rating

Afficher le fichier Open project: chovanec/elo-rating

Protected Properties

Свойство Type Description
$_expectedA
$_expectedB
$_newRatingA
$_newRatingB
$_ratingA Protected & private variables.
$_ratingB
$_scoreA
$_scoreB

Méthodes publiques

Méthode Description
__construct ( $ratingA, $ratingB, $scoreA, $scoreB ) Costructor function which does all the maths and stores the results ready for retrieval.
getNewRatings ( ) : Array Retrieve the calculated data.
setNewSettings ( $ratingA, $ratingB, $scoreA, $scoreB ) Set new input data.

Méthodes protégées

Méthode Description
_getExpectedScores ( $ratingA, $ratingB ) Protected & private functions begin here
_getNewRatings ( $ratingA, $ratingB, $expectedA, $expectedB, $scoreA, $scoreB )

Method Details

__construct() public méthode

Costructor function which does all the maths and stores the results ready for retrieval.
public __construct ( $ratingA, $ratingB, $scoreA, $scoreB )

_getExpectedScores() protected méthode

Protected & private functions begin here
protected _getExpectedScores ( $ratingA, $ratingB )

_getNewRatings() protected méthode

protected _getNewRatings ( $ratingA, $ratingB, $expectedA, $expectedB, $scoreA, $scoreB )

getNewRatings() public méthode

Retrieve the calculated data.
public getNewRatings ( ) : Array
Résultat Array An array containing the new ratings for A and B.

setNewSettings() public méthode

Set new input data.
public setNewSettings ( $ratingA, $ratingB, $scoreA, $scoreB )

Property Details

$_expectedA protected_oe property

protected $_expectedA

$_expectedB protected_oe property

protected $_expectedB

$_newRatingA protected_oe property

protected $_newRatingA

$_newRatingB protected_oe property

protected $_newRatingB

$_ratingA protected_oe property

Protected & private variables.
protected $_ratingA

$_ratingB protected_oe property

protected $_ratingB

$_scoreA protected_oe property

protected $_scoreA

$_scoreB protected_oe property

protected $_scoreB