Class PolarExercise

Description

Class to handle exercises (display details, graphs, laps, statistics, ...).)

Located in /class/PolarExercise.class.php (line 48)


	
			
Variable Summary
array $sports
integer $userId
Method Summary
void PolarExercise (integer $user_id, [string $publish_rights = 'public'])
void display_html (integer $exe_id, string $day, [string $tab = 'data'])
void _display_laps_header_columns (array $exe, array $lap_1, string $lap_type, [string $note_str = '1000m'])
void _display_laps_header_col_groups (array $exe, array $lap_1)
array _get_color_for_value (integer $value, integer $min_value, integer $max_value, array $min_color, array $max_color, [float $white_ratio = 0])
array _parse_hrm_file (integer $exe_id, integer $year, integer $month, integer $day, integer $rank)
Variables
string $publish_rights (line 59)

Publish rights in ('public','public-but-desc')

array $sports (line 65)

List of sports (From database)

  • var: Index is sport ID, element: array('name' => name, 'abbrev' => abbreviation)
integer $userId (line 54)

User ID (as in database)

Methods
Constructor PolarExercise (line 75)

Class constructor

void PolarExercise (integer $user_id, [string $publish_rights = 'public'])
  • integer $user_id: User ID (as in database)
  • string $publish_rights: Publish rights in ('public','public-but-desc')
display_html (line 94)

Display exercise HTML output

void display_html (integer $exe_id, string $day, [string $tab = 'data'])
  • integer $exe_id: ID of exercise to display
  • string $day: Day (YYYY-MM-DD format)
  • string $tab: Tab to display in :
    • 'graph' : Curves (HR, speed, ...), F(T) or F(D)
    • 'data' : Detailed data
    • 'laps' : Intermediate times (only if more than 1 lap
    or if speed is recorded)
    • 'stats' : Statistics
_display_laps_header_columns (line 1254)

Display header row for columns for laps

void _display_laps_header_columns (array $exe, array $lap_1, string $lap_type, [string $note_str = '1000m'])
  • array $exe: Exercise info, used to select columns
  • array $lap_1: First lap info, used to select columns
  • string $lap_type: Type of laps in ('polar','distance','interval')
  • string $note_str: Note title : step if 'distance', Ascend / descend if 'altitude'
_display_laps_header_col_groups (line 1196)

Display header row for group of columns for laps

void _display_laps_header_col_groups (array $exe, array $lap_1)
  • array $exe: Exercise info, used to select columns
  • array $lap_1: First lap info, used to select columns
_get_color_for_value (line 1326)

Get RGB color for a value between min and max

  • return: RGB color (array of 3 integers [0-255])
array _get_color_for_value (integer $value, integer $min_value, integer $max_value, array $min_color, array $max_color, [float $white_ratio = 0])
  • integer $value: Value
  • integer $min_value: Minimum value
  • integer $max_value: Maximum value
  • array $min_color: RGB color for min value (3 integers [0-255])
  • array $max_color: RGB color for max value (3 integers [0-255])
  • float $white_ratio: Mix with white color (0: no, 1: white)
_parse_hrm_file (line 1167)

Parse Polar HRM file to get all HR data (keep last HRM parsed in session)

  • return: Parsed structure
array _parse_hrm_file (integer $exe_id, integer $year, integer $month, integer $day, integer $rank)
  • integer $exe_id: Exercise ID
  • integer $year: Year of exercise date
  • integer $month: Month of exercise date
  • integer $day: Day of exercise date
  • integer $rank: Rank of exercise

Documentation generated on Sat, 28 Mar 2009 23:16:29 +0000 by phpDocumentor 1.4.1