| 1 | <?php | ||
| 7 | class Volume extends Quantity { | ||
| 8 | |||
| 9 | // The base unit for the `$units` conversion table | ||
| 10 | const BASE_UNIT = 'l'; // liter | ||
| 11 | |||
| 12 | // New objects will convert to this unit | ||
| 13 | static public $default_unit = self::BASE_UNIT; | ||
| 14 | |||
| 15 | // Conversion table for this Quantity | ||
| 16 | static public $units = array( | ||
| 17 | 'l' => 1, // base | ||
| 18 | 'usg' => 3.78541, | ||
| 19 | 'bg' => 4.54609, | ||
| 20 | ); | ||
| 21 | |||
| 22 | /** | ||
| 23 | * The convertor heart, that every sub class needs | ||
| 24 | */ | ||
| 25 | 	protected function convertor( $toUnit ) { | ||
| 28 | |||
| 29 | } | ||
| 30 |