VolumeUnit Enum Reference
The ThingsTelemetry\Traccar\Enums\VolumeUnit enum defines Traccar server fuel/volume measurement units.
Example
php
use ThingsTelemetry\Traccar\Enums\VolumeUnit;
$unit = VolumeUnit::IMPERIAL_GALLON;
$unit->value; // impGal
$unit->name; // IMPERIAL_GALLON
$unit->label(); // Imperial GallonEnum Cases
| Case | Value | Description |
|---|---|---|
LITERS | 'ltr' | Liters |
US_GALLON | 'usGal' | US Gallon |
IMPERIAL_GALLON | 'impGal' | Imperial Gallon |
IMPORTANT
The enum values have been derived from the Traccar source code.
Methods
public static function default(): self
Returns the default unit (LITERS).
public function label(): string
Returns a human-readable label (e.g., "US Gallon").