RTMS Docs






Rugby Tournament Management System – Core Functions Documentation


Rugby Tournament Management System – Core Functions Documentation

This technical documentation covers the core calculation functions implemented for the Rugby Tournament Management System.

Table of Contents

1. Match Score Calculator

The Match Score Calculator processes match events to calculate and display scores for rugby matches.

Core Functions

rtms_calculate_match_score($match_id)

Calculates match scores based on match events.

[
    'home_team' => [...],
    'away_team' => [...],
    'status' => (string),
    'has_events' => (bool)
]

rtms_get_match_score_display($match_id)

Returns a formatted match score string.

Shortcode

Invalid match ID

Displays match score with attributes:

Invalid match ID provided

2. Team Standings Calculator

Computes rankings based on match results according to rugby scoring rules.

Core Functions

rtms_calculate_tournament_standings($tournament_id, $force_recalculate = false)

Calculates standings for all teams in a tournament.

Shortcode

Invalid tournament ID

Invalid tournament ID provided

3. Player Statistics Tracking

Calculates comprehensive statistics for players.

Core Functions

rtms_calculate_player_statistics($player_id, $tournament_id = null)

Calculates statistics for a player.

Shortcode

No player specified

Invalid player ID provided

4. Match Timeline Generator

Creates chronological displays of match events.

Core Functions

rtms_generate_match_timeline($match_id)

Generates timeline data for a match.

Shortcode

No match specified

Invalid match ID provided