|
Automatische Punkteauswertung des RoboSAX
0.0.1
|
Public Member Functions | |
| __construct () | |
| Constructor of Teams objects. More... | |
| add_team ($nt) | |
| Adds the transmitted object of type Team to tms. More... | |
| remove_team ($id) | |
| Removes the team object with the ID $id from $tms. More... | |
| load_teams_from_db () | |
| Loads all teams from the database. More... | |
| save_teams_to_db () | |
| Saves the data inside $tms in the database. More... | |
| get_team_by_id ($tmp) | |
| Returns a Team object with the ID $tmp. More... | |
| order_teams_by_points () | |
| Orders $tms [desc] by points of the Team objects. More... | |
| order_teams_by_id () | |
| Orders $tms [asc] by teamid of the Team objects. More... | |
Public Attributes | |
| $tms = [] | |
| Teams::__construct | ( | ) |
Constructor of Teams objects.
Sets $tms to an empty array and $AnzTeams to 0.
| Teams::add_team | ( | $nt | ) |
Adds the transmitted object of type Team to tms.
Returns 'false' if one of the following events occures:
Returns 'true' if the integration of the transmitted object was successfully.
If the ID of $nt is zero, it will change automaticly to size of $tms + 1.
| Teams::get_team_by_id | ( | $tmp | ) |
| Teams::load_teams_from_db | ( | ) |
Loads all teams from the database.
This function uses the load_team_from_db($id) function of a Team object, to load all teams from the database.
Returns 'false' if one of the following events occure:
Returns 'true' if all teams were loaded successfully.
| Teams::order_teams_by_id | ( | ) |
Orders $tms [asc] by teamid of the Team objects.
| Teams::order_teams_by_points | ( | ) |
Orders $tms [desc] by points of the Team objects.
| Teams::remove_team | ( | $id | ) |
Removes the team object with the ID $id from $tms.
Returns 'true' if an object was successfully deleted from $tms.
Returns 'false' if either:
| Teams::save_teams_to_db | ( | ) |
Saves the data inside $tms in the database.
This function uses the save_team_to_db() function of a Team object in a loop to save the data inside of $tms.
Returns 'false' if save_team_to_db() returns false.
Returns 'true' if the data could be saved to the database successfully.
| Teams::$tms = [] |
1.8.11