1 | <?php |
||
16 | class Lookup |
||
17 | { |
||
18 | /** @var TableInterface */ |
||
19 | protected $Table; |
||
20 | |||
21 | /** @var int [years] */ |
||
22 | protected $Age; |
||
23 | |||
24 | /** |
||
25 | * @param TableInterface $table |
||
26 | * @param int $age [years] |
||
27 | * |
||
28 | * @throws \InvalidArgumentException |
||
29 | */ |
||
30 | 5 | public function __construct(TableInterface $table, $age) |
|
39 | |||
40 | /** |
||
41 | * @param float $distance [km] |
||
42 | * @param int $timeInSeconds [s] |
||
43 | * @param int $yearsAgo [years] will be subtracted from internal age |
||
44 | * @return float |
||
45 | */ |
||
46 | 4 | public function getAgePerformance($distance, $timeInSeconds, $yearsAgo = 0) |
|
50 | |||
51 | /** |
||
52 | * @param float $distance [km] |
||
53 | * @param int $timeInSeconds [s] |
||
54 | * @param int $yearsAgo [years] will be subtracted from internal age |
||
55 | * @return AgeGrade |
||
56 | */ |
||
57 | 1 | public function getAgeGrade($distance, $timeInSeconds, $yearsAgo = 0) |
|
61 | |||
62 | /** |
||
63 | * @return float [km] |
||
64 | */ |
||
65 | public function getMinimalDistance() |
||
69 | } |
||
70 |