<?php

namespace EnumType;

/**
 * This class stands for JP_ProductType EnumType
 * @subpackage Enumerations
 */
class JP_ProductType
{
    /**
     * Constant for value 'TKT'
     * @return string 'TKT'
     */
    const VALUE_TKT = 'TKT';
    /**
     * Constant for value 'TRF'
     * @return string 'TRF'
     */
    const VALUE_TRF = 'TRF';
    /**
     * Constant for value 'VSD'
     * @return string 'VSD'
     */
    const VALUE_VSD = 'VSD';
    /**
     * Constant for value 'CAR'
     * @return string 'CAR'
     */
    const VALUE_CAR = 'CAR';
    /**
     * Constant for value 'HOT'
     * @return string 'HOT'
     */
    const VALUE_HOT = 'HOT';
    /**
     * Constant for value 'FLH'
     * @return string 'FLH'
     */
    const VALUE_FLH = 'FLH';
    /**
     * Constant for value 'PCK'
     * @return string 'PCK'
     */
    const VALUE_PCK = 'PCK';
    /**
     * Constant for value 'INS'
     * @return string 'INS'
     */
    const VALUE_INS = 'INS';
    /**
     * Constant for value 'CRU'
     * @return string 'CRU'
     */
    const VALUE_CRU = 'CRU';
    /**
     * Return true if value is allowed
     * @uses self::getValidValues()
     * @param mixed $value value
     * @return bool true|false
     */
    public static function valueIsValid($value)
    {
        return ($value === null) || in_array($value, self::getValidValues(), true);
    }
    /**
     * Return allowed values
     * @uses self::VALUE_TKT
     * @uses self::VALUE_TRF
     * @uses self::VALUE_VSD
     * @uses self::VALUE_CAR
     * @uses self::VALUE_HOT
     * @uses self::VALUE_FLH
     * @uses self::VALUE_PCK
     * @uses self::VALUE_INS
     * @uses self::VALUE_CRU
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_TKT,
            self::VALUE_TRF,
            self::VALUE_VSD,
            self::VALUE_CAR,
            self::VALUE_HOT,
            self::VALUE_FLH,
            self::VALUE_PCK,
            self::VALUE_INS,
            self::VALUE_CRU,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
