<?php
 
 
 

namespace PhpWA\Protocol\Proto\Message\ExtendedTextMessage;

use UnexpectedValueException;




class FontType
{
    


    const SYSTEM = 0;
    


    const SYSTEM_TEXT = 1;
    


    const FB_SCRIPT = 2;
    


    const SYSTEM_BOLD = 6;
    


    const MORNINGBREEZE_REGULAR = 7;
    


    const CALISTOGA_REGULAR = 8;
    


    const EXO2_EXTRABOLD = 9;
    


    const COURIERPRIME_BOLD = 10;

    private static $valueToName = [
        self::SYSTEM => 'SYSTEM',
        self::SYSTEM_TEXT => 'SYSTEM_TEXT',
        self::FB_SCRIPT => 'FB_SCRIPT',
        self::SYSTEM_BOLD => 'SYSTEM_BOLD',
        self::MORNINGBREEZE_REGULAR => 'MORNINGBREEZE_REGULAR',
        self::CALISTOGA_REGULAR => 'CALISTOGA_REGULAR',
        self::EXO2_EXTRABOLD => 'EXO2_EXTRABOLD',
        self::COURIERPRIME_BOLD => 'COURIERPRIME_BOLD',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

