public function ToPersistedValue($PropertyValue)
{
$PersistedValue = array_search($PropertyValue, $this->ValuesMap, true);
if ($PersistedValue === false) {
throw new DataTypeException('Cannot map enum property value to persisted value: expecting %s, %s given', implode(', ', array_map('strval', $PersistedValue)), \Storm\Core\Utilities::GetTypeOrClass($PropertyValue));
}
return $PersistedValue;
}