Function __global->calculate_leader_board
Definitions
sources/leader_board.php
- Calculate a leader-board.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $row | array | No | No | required parameter | N/A | N/A | The leader-board row to calculate |
| $forced_time | ?TIME | No | No | Null | N/A | N/A | Pretend the current time is the provided timestamp (null: use the current time in the site's timezone) |
| $forced_period_start | ?TIME | No | No | Null | N/A | N/A | Pretend the most recent result set was generated on the provided timestamp (null: use the actual most recent timestamp) |
Returns
- The timestamp of the result set (null: a new result set was not generated)
- Type: ?TIME
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Calculate a leader-board.
*
* @param array $row The leader-board row to calculate
* @param ?TIME $forced_time Pretend the current time is the provided timestamp (null: use the current time in the site's timezone)
* @param ?TIME $forced_period_start Pretend the most recent result set was generated on the provided timestamp (null: use the actual most recent timestamp)
* @return ?TIME The timestamp of the result set (null: a new result set was not generated)
*/
function calculate_leader_board(array $row, ?int $forced_time = null, ?int $forced_period_start = null) : ?int
* Calculate a leader-board.
*
* @param array $row The leader-board row to calculate
* @param ?TIME $forced_time Pretend the current time is the provided timestamp (null: use the current time in the site's timezone)
* @param ?TIME $forced_period_start Pretend the most recent result set was generated on the provided timestamp (null: use the actual most recent timestamp)
* @return ?TIME The timestamp of the result set (null: a new result set was not generated)
*/
function calculate_leader_board(array $row, ?int $forced_time = null, ?int $forced_period_start = null) : ?int

