/** * @param mixed $value * @return mixed */ public function process($value) { if ($this->dataType !== null) { $value = $this->propertyMapper->convert($value, $this->dataType, $this->propertyMappingConfiguration); $messages = $this->propertyMapper->getMessages(); } else { $messages = new \TYPO3\Flow\Error\Result(); } $validationResult = $this->validator->validate($value); $messages->merge($validationResult); $this->processingMessages->merge($messages); return $value; }
/** * * Validate an integer value with the given schema * * The following properties are handled in given $schema: * - all Properties from number type * * @see TYPO3\Flow\Utility\schemaValidator\validateNumberType * @param mixed $value * @param array $schema * @return \TYPO3\Flow\Error\Result */ protected function validateIntegerType($value, array $schema) { $result = new \TYPO3\Flow\Error\Result(); if (is_integer($value) === false) { $result->addError($this->createError('type=integer', 'type=' . gettype($value))); return $result; } $result->merge($this->validateNumberType($value, $schema)); return $result; }