<?php

namespace dgsoft\EnumType;

/**
 * This class stands for PhoneTypeEnum EnumType
 * @package Dg
 * @subpackage Enumerations
 */
class DgPhoneTypeEnum
{
    /**
     * Constant for value 'Home'
     * @return string 'Home'
     */
    const VALUE_HOME = 'Home';
    /**
     * Constant for value 'Office'
     * @return string 'Office'
     */
    const VALUE_OFFICE = 'Office';
    /**
     * Constant for value 'Gsm'
     * @return string 'Gsm'
     */
    const VALUE_GSM = 'Gsm';
    /**
     * 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_HOME
     * @uses self::VALUE_OFFICE
     * @uses self::VALUE_GSM
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_HOME,
            self::VALUE_OFFICE,
            self::VALUE_GSM,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
