|
Automatische Punkteauswertung des RoboSAX
0.0.1
|
Public Member Functions | |
| __construct () | |
| Constructor of a Team object. Sets all private variables to 0, "" or true (active). More... | |
| load_team_from_db ($id) | |
| Loads team data from the database. More... | |
| save_team_to_db () | |
| Saves team data in the database. More... | |
| get_id () | |
| Returns the attribute $teamid of this object. More... | |
| get_teamleader () | |
| Returns the attribute $teamleader of this object. More... | |
| get_points () | |
| Returns the attribute $points of this object. More... | |
| get_robot () | |
| Returns the attribute $robot of this object. More... | |
| get_name () | |
| Returns the attribute $name of this object. More... | |
| get_position () | |
| Returns the attribute $position of this object. More... | |
| get_active () | |
| Returns the attribute $active of this object. More... | |
| set_teamleader ($tmp) | |
| Sets $teamleader of this object to $tmp. More... | |
| set_points ($tmp) | |
| Sets $points of this object to $tmp. More... | |
| set_robot ($tmp) | |
| Sets $robot of this object to $tmp. More... | |
| set_name ($tmp) | |
| Sets $name of this object to $tmp. More... | |
| set_position ($tmp) | |
| Sets $position of this object to $tmp. More... | |
| set_active ($tmp) | |
| Sets $active of this object to $tmp. More... | |
| Team::__construct | ( | ) |
Constructor of a Team object. Sets all private variables to 0, "" or true (active).
| Team::get_active | ( | ) |
Returns the attribute $active of this object.
| Team::get_id | ( | ) |
Returns the attribute $teamid of this object.
| Team::get_name | ( | ) |
Returns the attribute $name of this object.
| Team::get_points | ( | ) |
Returns the attribute $points of this object.
| Team::get_position | ( | ) |
Returns the attribute $position of this object.
| Team::get_robot | ( | ) |
Returns the attribute $robot of this object.
| Team::get_teamleader | ( | ) |
Returns the attribute $teamleader of this object.
| Team::load_team_from_db | ( | $id | ) |
Loads team data from the database.
This function sends a sql request to the linked database (specified in the settings.ini file) to get the data of the team with the ID $id. The data is safed in the private attributes.
Returns 'false' if one of the following events occure:
Returns 'true' if there were no errors
'false'-outputs will be logged (if enabled in the settings.ini file)
| Team::save_team_to_db | ( | ) |
Saves team data in the database.
This function sends a sql request to the linked database (specified in the settings.ini file) to safe the objects private attributes in the database.
There are two possible uses for this function:
Returns 'true' if one of the following events occure:
Returns 'false' in all other cases. For example:
| Team::set_active | ( | $tmp | ) |
Sets $active of this object to $tmp.
Returns 'false' if $tmp is not of type integer (as 0 is interpreted as false and all other numbers as true) or boolean. Returns 'true' else.
| Team::set_name | ( | $tmp | ) |
Sets $name of this object to $tmp.
Returns 'false' if $tmp is not of type string. Returns 'true' else.
| Team::set_points | ( | $tmp | ) |
Sets $points of this object to $tmp.
Returns 'false' if $tmp is not of type integer. Returns 'true' else.
| Team::set_position | ( | $tmp | ) |
Sets $position of this object to $tmp.
Returns 'false' if $tmp is not of type integer. Returns 'true' else.
| Team::set_robot | ( | $tmp | ) |
Sets $robot of this object to $tmp.
Returns 'false' if $tmp is not of type string. Returns 'true' else.
| Team::set_teamleader | ( | $tmp | ) |
Sets $teamleader of this object to $tmp.
Returns 'false' if $tmp is not of type string. Returns 'true' else.
1.8.11