protected function validateEnum ($name, $v)
  {
    $enum = $this->getEnumOf ($name);
    if (is_null ($v) && !$this->isRequired($name))
      return;
    if (array_search ($v, $enum) === false) {
      $list = implode ('</b>, <b>', $enum);
      throw new ComponentException ($this->component,
        "Invalid value for attribute/parameter <b>$name</b>.\nExpected: <b>$list</b>.");
    }
  }
protected function validateEnum ($name, $v)
  {
    $enum = $this->getEnumOf ($name);
    if (is_null ($v) && !$this->isRequired($name))
      return;
    if (array_search ($v, $enum) === false) {
      $list = implode ('</b>, <b>', $enum);
      throw new ComponentException ($this->component,
        "Invalid value for attribute/parameter <b>$name</b>.\nExpected: <b>$list</b>.");
    }
  }
protected function validateEnum ( $ name , $ v ) { $ enum = $ this -> getEnumOf ( $ name ) ; if ( is_null ( $ v ) && ! $ this -> isRequired ( $ name ) ) return ; if ( array_search ( $ v , $ enum ) === false ) { $ list = implode ( '</b>, <b>' , $ enum ) ; throw new ComponentException ( $ this -> component , "Invalid value for attribute/parameter <b>$name</b>.\nExpected: <b>$list</b>." ) ; } }
Throws an exception if the the specified value is not valid for the given enumerated property.

@param string $name
@param mixed  $v
@throws ComponentException
@throws ReflectionPropertyException
Throws an exception if the the specified value is not valid for the given enumerated property .