<?php
/**
 * This class stands for XDayOfWeek EnumType
 * @subpackage Enumerations
 */
class XDayOfWeek
{
    /**
     * Constant for value 'Sun'
     * @return string 'Sun'
     */
    const VALUE_SUN = 'Sun';
    /**
     * Constant for value 'Mon'
     * @return string 'Mon'
     */
    const VALUE_MON = 'Mon';
    /**
     * Constant for value 'Tue'
     * @return string 'Tue'
     */
    const VALUE_TUE = 'Tue';
    /**
     * Constant for value 'Wed'
     * @return string 'Wed'
     */
    const VALUE_WED = 'Wed';
    /**
     * Constant for value 'Thu'
     * @return string 'Thu'
     */
    const VALUE_THU = 'Thu';
    /**
     * Constant for value 'Fri'
     * @return string 'Fri'
     */
    const VALUE_FRI = 'Fri';
    /**
     * Constant for value 'Sat'
     * @return string 'Sat'
     */
    const VALUE_SAT = 'Sat';
    /**
     * Constant for value 'None'
     * @return string 'None'
     */
    const VALUE_NONE = 'None';
    /**
     * 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_SUN
     * @uses self::VALUE_MON
     * @uses self::VALUE_TUE
     * @uses self::VALUE_WED
     * @uses self::VALUE_THU
     * @uses self::VALUE_FRI
     * @uses self::VALUE_SAT
     * @uses self::VALUE_NONE
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_SUN,
            self::VALUE_MON,
            self::VALUE_TUE,
            self::VALUE_WED,
            self::VALUE_THU,
            self::VALUE_FRI,
            self::VALUE_SAT,
            self::VALUE_NONE,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
