<?php
/**
 * This class stands for XClockReference EnumType
 * @subpackage Enumerations
 */
class XClockReference
{
    /**
     * Constant for value 'Network'
     * @return string 'Network'
     */
    const VALUE_NETWORK = 'Network';
    /**
     * Constant for value 'Internal'
     * @return string 'Internal'
     */
    const VALUE_INTERNAL = 'Internal';
    /**
     * Constant for value 'Span 1'
     * @return string 'Span 1'
     */
    const VALUE_SPAN_1 = 'Span 1';
    /**
     * Constant for value 'Span 2'
     * @return string 'Span 2'
     */
    const VALUE_SPAN_2 = 'Span 2';
    /**
     * Constant for value 'Span 3'
     * @return string 'Span 3'
     */
    const VALUE_SPAN_3 = 'Span 3';
    /**
     * Constant for value 'Span 4'
     * @return string 'Span 4'
     */
    const VALUE_SPAN_4 = 'Span 4';
    /**
     * Constant for value 'Span 5'
     * @return string 'Span 5'
     */
    const VALUE_SPAN_5 = 'Span 5';
    /**
     * Constant for value 'Span 6'
     * @return string 'Span 6'
     */
    const VALUE_SPAN_6 = 'Span 6';
    /**
     * Constant for value 'Span 7'
     * @return string 'Span 7'
     */
    const VALUE_SPAN_7 = 'Span 7';
    /**
     * Constant for value 'Span 8'
     * @return string 'Span 8'
     */
    const VALUE_SPAN_8 = 'Span 8';
    /**
     * 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_NETWORK
     * @uses self::VALUE_INTERNAL
     * @uses self::VALUE_SPAN_1
     * @uses self::VALUE_SPAN_2
     * @uses self::VALUE_SPAN_3
     * @uses self::VALUE_SPAN_4
     * @uses self::VALUE_SPAN_5
     * @uses self::VALUE_SPAN_6
     * @uses self::VALUE_SPAN_7
     * @uses self::VALUE_SPAN_8
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_NETWORK,
            self::VALUE_INTERNAL,
            self::VALUE_SPAN_1,
            self::VALUE_SPAN_2,
            self::VALUE_SPAN_3,
            self::VALUE_SPAN_4,
            self::VALUE_SPAN_5,
            self::VALUE_SPAN_6,
            self::VALUE_SPAN_7,
            self::VALUE_SPAN_8,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
