/include/int_training.php

Description

Interval training parse and display functions

Functions
int_training_format (line 144)

Format interval training expression for nice output

  • return: Formatted interval training
string int_training_format (array $train_tab)
  • array $train_tab: Array of interval training components
int_training_parse (line 29)

Parse interval training expression

  • return: Array of interval training elements (index from 0) :
    • repeat_nb : Nb of repetitions (integer >= 1)
    • work_distance : Distance of effort in meters
    • work_duration : Duration of effort in seconds
    • reco_distance : Distance of recovery in meters
    • reco_duration : Duration of recovery in seconds
    Work and recovery are defined either by distance (usual for work) or duration. If recovery is empty and repeat_nb > 1 => recovery duration unknown If work is empty and repeat_nb = 1 => recovery only Return null if expression is not valid.
array int_training_parse (string $expr)
  • string $expr: Interval training expression as in {F=<expr>}
work_recovery_parse (line 102)

Parse interval training work or recovery element (separated by '+' in interval training expression

  • return: true if element is valid, else false
boolean work_recovery_parse (string $expr, integer &$distance, integer &$duration)
  • string $expr: Interval training element
  • integer &$distance: Distance of work or recovery in meters if element is a distance, else null
  • integer &$duration: Duration of work or recovery in seconds if element is a duration, else null

Documentation generated on Sat, 28 Mar 2009 23:15:26 +0000 by phpDocumentor 1.4.1