protected createValueFromInput ( string | integer | DateTime | |
||
$inputValue | string | integer | DateTime | |
|
Результат | The potentially converted and structurally plausible value. |
protected function createValueFromInput($inputValue)
{
if (is_string($inputValue)) {
$inputValue = Value::fromString($inputValue);
}
if (is_int($inputValue)) {
$inputValue = Value::fromTimestamp($inputValue);
}
if ($inputValue instanceof DateTime) {
$inputValue = Value::fromDateTime($inputValue);
}
return $inputValue;
}