LeanMapper\Reflection\PropertyValuesEnum::isValueFromEnum PHP Method

isValueFromEnum() public method

Tells wheter given value is from enumeration
public isValueFromEnum ( mixed $value ) : boolean
$value mixed
return boolean
    public function isValueFromEnum($value)
    {
        return isset($this->index[$value]);
    }

Usage Example

Example #1
0
 /**
  * Tells wheter given value is from enumeration
  *
  * @param mixed $value
  * @return bool
  * @throws InvalidMethodCallException
  */
 public function isValueFromEnum($value)
 {
     $this->checkContainsEnumeration();
     return $this->propertyValuesEnum->isValueFromEnum($value);
 }