// Convert non-breaking and narrow non-breaking spaces to normal ones
$value = str_replace(["\xc2\xa0", "\xe2\x80\xaf"], ' ', $value);
return$value; }
/**
* Transforms a localized number into an integer or float.
*
* @param string $value The localized value
*
* @throws TransformationFailedException if the given value is not a string
* or if the value cannot be transformed
*/
switch($this->error){ case \UPLOAD_ERR_INI_SIZE: thrownewIniSizeFileException($this->getErrorMessage()); case \UPLOAD_ERR_FORM_SIZE: thrownewFormSizeFileException($this->getErrorMessage()); case \UPLOAD_ERR_PARTIAL: thrownewPartialFileException($this->getErrorMessage()); case \UPLOAD_ERR_NO_FILE: thrownewNoFileException($this->getErrorMessage()); case \UPLOAD_ERR_CANT_WRITE: thrownewCannotWriteFileException($this->getErrorMessage()); case \UPLOAD_ERR_NO_TMP_DIR: thrownewNoTmpDirFileException($this->getErrorMessage()); case \UPLOAD_ERR_EXTENSION:
// replace the UTF-8 non break spaces
return$value; }
/**
* Transforms between a percentage value into a normalized format (integer or float).
*
* @param string $value Percentage value
*
* @throws TransformationFailedException if the given value is not a string or
* if the value could not be transformed
*/