<?php
/**
 * This class stands for XPartitionUsage EnumType
 * @subpackage Enumerations
 */
class XPartitionUsage
{
    /**
     * Constant for value 'Intercom'
     * @return string 'Intercom'
     */
    const VALUE_INTERCOM = 'Intercom';
    /**
     * Constant for value 'Call Control Discovery Learned Pattern'
     * @return string 'Call Control Discovery Learned Pattern'
     */
    const VALUE_CALL_CONTROL_DISCOVERY_LEARNED_PATTERN = 'Call Control Discovery Learned Pattern';
    /**
     * Constant for value 'General'
     * @return string 'General'
     */
    const VALUE_GENERAL = 'General';
    /**
     * Constant for value 'Directory URI'
     * @return string 'Directory URI'
     */
    const VALUE_DIRECTORY_URI = 'Directory URI';
    /**
     * 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_INTERCOM
     * @uses self::VALUE_CALL_CONTROL_DISCOVERY_LEARNED_PATTERN
     * @uses self::VALUE_GENERAL
     * @uses self::VALUE_DIRECTORY_URI
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_INTERCOM,
            self::VALUE_CALL_CONTROL_DISCOVERY_LEARNED_PATTERN,
            self::VALUE_GENERAL,
            self::VALUE_DIRECTORY_URI,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
