\CLSASC\EquivalentTimeEquivalentTime

A PHP Class to implement the British Swimming Equivalent Time Algorithm

Summary

Methods
Properties
Constants
__construct()
getConversion()
setOutputAsString()
setOutputAsReal()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$source_pool_length
$time_source
$time_50
$event
$distance
$pool_length_flag
$turns_per_hundred
$formattedString
N/A

Properties

$source_pool_length

$source_pool_length : 

Type

$time_source

$time_source : 

Type

$time_50

$time_50 : 

Type

$event

$event : 

Type

$distance

$distance : 

Type

$pool_length_flag

$pool_length_flag : 

Type

$turns_per_hundred

$turns_per_hundred : 

Type

$formattedString

$formattedString : 

Type

Methods

__construct()

__construct(string  $source_pool_length, string  $event, double  $time_source) 

The constructor for a time object. This will contain the information about the source pool and time, as well as T50

Parameters

string $source_pool_length

descibes the length of the source pool, ie "50m"

string $event

describes the event, ie "50 Free"

double $time_source

time in the source pool as a double eg 62.56 or 27.59

Throws

\CLSASC\EquivalentTime\ConversionExceptions\IllegalEventException

if the event was not recognised or is not allowed

\CLSASC\EquivalentTime\ConversionExceptions\NegativeOutputException

if the output time or a section of the output time is negative (hence illegal)

\CLSASC\EquivalentTime\ConversionExceptions\UncateredConversionException

if a conversion for this event/pool has not been implemented or is not provided for in the SPORTSYSTEMS/ASA specification for this converter

\CLSASC\EquivalentTime\ConversionExceptions\UndefinedPoolLengthException

if the source pool length or requested conversion length does not exist

getConversion()

getConversion(string  $target_pool_length) 

Method to get a conversion

Parameters

string $target_pool_length

string representing the length of pool to convert the time to

Throws

\CLSASC\EquivalentTime\ConversionExceptions\IllegalEventException

if the event was not recognised or is not allowed

\CLSASC\EquivalentTime\ConversionExceptions\NegativeOutputException

if the output time or a section of the output time is negative (hence illegal)

\CLSASC\EquivalentTime\ConversionExceptions\UncateredConversionException

if a conversion for this event/pool has not been implemented or is not provided for in the SPORTSYSTEMS/ASA specification for this converter

\CLSASC\EquivalentTime\ConversionExceptions\UndefinedPoolLengthException

if the source pool length or requested conversion length does not exist

setOutputAsString()

setOutputAsString(boolean  $boolean = true) 

Set the output type for conversions to a string. Default is false (output as float/double)

Parameters

boolean $boolean

set true to output conversion as a string, false to output a float (double)

setOutputAsReal()

setOutputAsReal() 

Set the output type for conversions to a string. Default is false (output as float/double)