| 1 | <?php |
||
| 7 | class Temperature extends Quantity { |
||
| 8 | |||
| 9 | // The base unit for the `$units` conversion table |
||
| 10 | const BASE_UNIT = 'k'; // Kelvin |
||
| 11 | |||
| 12 | // New objects will convert to this unit |
||
| 13 | static public $default_unit = self::BASE_UNIT; |
||
| 14 | |||
| 15 | static public $units = array('k', 'c', 'f'); |
||
| 16 | |||
| 17 | /** |
||
| 18 | * |
||
| 19 | */ |
||
| 20 | protected function convertor( $toUnit ) { |
||
| 23 | |||
| 24 | /** |
||
| 25 | * |
||
| 26 | */ |
||
| 27 | protected function kToF( $amount ) { |
||
| 30 | |||
| 31 | /** |
||
| 32 | * |
||
| 33 | */ |
||
| 34 | protected function fToK( $amount ) { |
||
| 37 | |||
| 38 | /** |
||
| 39 | * |
||
| 40 | */ |
||
| 41 | protected function kToC( $amount ) { |
||
| 44 | |||
| 45 | /** |
||
| 46 | * |
||
| 47 | */ |
||
| 48 | protected function cToK( $amount ) { |
||
| 51 | |||
| 52 | } |
||
| 53 |