PHP Class Rating\Rating

显示文件 Open project: chovanec/elo-rating

Protected Properties

Property Type Description
$_expectedA
$_expectedB
$_newRatingA
$_newRatingB
$_ratingA Protected & private variables.
$_ratingB
$_scoreA
$_scoreB

Public Methods

Method 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.

Protected Methods

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

Method Details

__construct() public method

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

_getExpectedScores() protected method

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

_getNewRatings() protected method

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

getNewRatings() public method

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

setNewSettings() public method

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