<?php
/**
 * This class stands for XMWLPolicy EnumType
 * @subpackage Enumerations
 */
class XMWLPolicy
{
    /**
     * Constant for value 'Use System Policy'
     * @return string 'Use System Policy'
     */
    const VALUE_USE_SYSTEM_POLICY = 'Use System Policy';
    /**
     * Constant for value 'Light and Prompt'
     * @return string 'Light and Prompt'
     */
    const VALUE_LIGHT_AND_PROMPT = 'Light and Prompt';
    /**
     * Constant for value 'Prompt Only'
     * @return string 'Prompt Only'
     */
    const VALUE_PROMPT_ONLY = 'Prompt Only';
    /**
     * Constant for value 'Light Only'
     * @return string 'Light Only'
     */
    const VALUE_LIGHT_ONLY = 'Light Only';
    /**
     * 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_USE_SYSTEM_POLICY
     * @uses self::VALUE_LIGHT_AND_PROMPT
     * @uses self::VALUE_PROMPT_ONLY
     * @uses self::VALUE_LIGHT_ONLY
     * @uses self::VALUE_NONE
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_USE_SYSTEM_POLICY,
            self::VALUE_LIGHT_AND_PROMPT,
            self::VALUE_PROMPT_ONLY,
            self::VALUE_LIGHT_ONLY,
            self::VALUE_NONE,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
