33 lines
685 B
PHP
33 lines
685 B
PHP
<?php
|
|
|
|
namespace App\Ramcar;
|
|
|
|
class ServiceType
|
|
{
|
|
const BATTERY_REPLACEMENT = 'battery';
|
|
const TIRE_REPAIR = 'tire';
|
|
const OVERHEAT_ASSITANCE = 'overheat';
|
|
const EMERGENCY_REFUEL = 'fuel';
|
|
|
|
const COLLECTION = [
|
|
'battery' => 'Battery Replacement',
|
|
'tire' => 'Tire Repair',
|
|
'overheat' => 'Overheat Assistance',
|
|
'fuel' => 'Emergency Refuel',
|
|
];
|
|
|
|
|
|
static public function getCollection()
|
|
{
|
|
return self::COLLECTION;
|
|
}
|
|
|
|
static public function validate($type_text)
|
|
{
|
|
if (isset(self::COLLECTION[$type_text]))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
}
|