Api\StarterKit\Enums\Enum::getLabel PHP Method

getLabel() public static method

public static getLabel ( $code, $isLower = false )
    public static function getLabel($code, $isLower = false)
    {
        $class = new ReflectionClass(get_called_class());
        $constants = $class->getConstants();
        $constants = array_flip($constants);
        if ($isLower) {
            return strtolower($constants[$code]);
        }
        return $constants[$code];
    }