<?php

namespace EnumType;

/**
 * This class stands for JP_ZoneType EnumType
 * @subpackage Enumerations
 */
class JP_ZoneType
{
    /**
     * Constant for value 'ALO'
     * @return string 'ALO'
     */
    const VALUE_ALO = 'ALO';
    /**
     * Constant for value 'ARP'
     * @return string 'ARP'
     */
    const VALUE_ARP = 'ARP';
    /**
     * Constant for value 'EST'
     * @return string 'EST'
     */
    const VALUE_EST = 'EST';
    /**
     * Constant for value 'PRT'
     * @return string 'PRT'
     */
    const VALUE_PRT = 'PRT';
    /**
     * Constant for value 'OTR'
     * @return string 'OTR'
     */
    const VALUE_OTR = 'OTR';
    /**
     * 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_ALO
     * @uses self::VALUE_ARP
     * @uses self::VALUE_EST
     * @uses self::VALUE_PRT
     * @uses self::VALUE_OTR
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_ALO,
            self::VALUE_ARP,
            self::VALUE_EST,
            self::VALUE_PRT,
            self::VALUE_OTR,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
