<?php
/**
 * This class stands for XDTMFSignaling EnumType
 * @subpackage Enumerations
 */
class XDTMFSignaling
{
    /**
     * Constant for value 'No Preference'
     * @return string 'No Preference'
     */
    const VALUE_NO_PREFERENCE = 'No Preference';
    /**
     * Constant for value 'Out of Band'
     * @return string 'Out of Band'
     */
    const VALUE_OUT_OF_BAND = 'Out of Band';
    /**
     * Constant for value 'RFC 2833'
     * @return string 'RFC 2833'
     */
    const VALUE_RFC_2833 = 'RFC 2833';
    /**
     * Constant for value 'OOB and RFC 2833'
     * @return string 'OOB and RFC 2833'
     */
    const VALUE_OOB_AND_RFC_2833 = 'OOB and RFC 2833';
    /**
     * 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_NO_PREFERENCE
     * @uses self::VALUE_OUT_OF_BAND
     * @uses self::VALUE_RFC_2833
     * @uses self::VALUE_OOB_AND_RFC_2833
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_NO_PREFERENCE,
            self::VALUE_OUT_OF_BAND,
            self::VALUE_RFC_2833,
            self::VALUE_OOB_AND_RFC_2833,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
