Neos\Flow\Property\TypeConverter\IntegerConverter::convertFrom PHP Метод

convertFrom() публичный Метод

Actually convert from $source to $targetType, in fact a noop here.
public convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : integer | Neos\Error\Messages\Error
$source mixed
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат integer | Neos\Error\Messages\Error
    public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        if ($source instanceof \DateTimeInterface) {
            return $source->format('U');
        }
        if ($source === null || strlen($source) === 0) {
            return null;
        }
        if (!is_numeric($source)) {
            return new Error('"%s" is not numeric.', 1332933658, [$source]);
        }
        return (int) $source;
    }
IntegerConverter