<?php

namespace EnumType;

/**
 * This class stands for JP_ResStatus EnumType
 * @subpackage Enumerations
 */
class JP_ResStatus
{
    /**
     * Constant for value 'INI'
     * @return string 'INI'
     */
    const VALUE_INI = 'INI';
    /**
     * Constant for value 'PRE'
     * @return string 'PRE'
     */
    const VALUE_PRE = 'PRE';
    /**
     * Constant for value 'PDI'
     * @return string 'PDI'
     */
    const VALUE_PDI = 'PDI';
    /**
     * Constant for value 'CON'
     * @return string 'CON'
     */
    const VALUE_CON = 'CON';
    /**
     * Constant for value 'TAR'
     * @return string 'TAR'
     */
    const VALUE_TAR = 'TAR';
    /**
     * Constant for value 'ETA'
     * @return string 'ETA'
     */
    const VALUE_ETA = 'ETA';
    /**
     * Constant for value 'PAG'
     * @return string 'PAG'
     */
    const VALUE_PAG = 'PAG';
    /**
     * Constant for value 'CAC'
     * @return string 'CAC'
     */
    const VALUE_CAC = 'CAC';
    /**
     * Constant for value 'CAN'
     * @return string 'CAN'
     */
    const VALUE_CAN = 'CAN';
    /**
     * Constant for value 'QUO'
     * @return string 'QUO'
     */
    const VALUE_QUO = 'QUO';
    /**
     * 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_INI
     * @uses self::VALUE_PRE
     * @uses self::VALUE_PDI
     * @uses self::VALUE_CON
     * @uses self::VALUE_TAR
     * @uses self::VALUE_ETA
     * @uses self::VALUE_PAG
     * @uses self::VALUE_CAC
     * @uses self::VALUE_CAN
     * @uses self::VALUE_QUO
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_INI,
            self::VALUE_PRE,
            self::VALUE_PDI,
            self::VALUE_CON,
            self::VALUE_TAR,
            self::VALUE_ETA,
            self::VALUE_PAG,
            self::VALUE_CAC,
            self::VALUE_CAN,
            self::VALUE_QUO,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
