Major refactoring for PIREP statuses and states to accomodate ACARS/route data
This commit is contained in:
28
app/Models/Enums/EnumBase.php
Normal file
28
app/Models/Enums/EnumBase.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: nshahzad
|
||||
* Date: 12/19/17
|
||||
* Time: 8:04 PM
|
||||
*/
|
||||
|
||||
namespace App\Models\Enums;
|
||||
|
||||
|
||||
/**
|
||||
* Class EnumBase
|
||||
* @package App\Models\Enums
|
||||
* TODO: Implement lang translations for enum labels
|
||||
*/
|
||||
class EnumBase
|
||||
{
|
||||
protected static $labels = [];
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
* @return mixed
|
||||
*/
|
||||
public static function label($value) {
|
||||
return self::$labels[$value];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user