__construct()
__invoke()
filter()
getOptions()
getOverwrite()
getRandomize()
getTarget()
getUseUploadName()
hasPcreUnicodeSupport()
setOptions()
setOverwrite()
setRandomize()
setTarget()
setUseUploadName()
applyRandomToFilename()
checkFileExists()
getFinalTarget()
isOptions()
moveUploadedFile()
$alreadyFiltered
$options
__construct(array | string $targetOrOptions)
arraystring
The target file path or an options array
__invoke(mixed $value) : mixed
Proxies to filter()
inherited_from | \Zend\Filter\AbstractFilter::__invoke() |
---|
mixed
\Zend\Filter\Exception\ExceptionInterface |
If filtering $value is impossible |
---|
mixed
filter(string | array $value) : string | array
Renames the file $value to the new name set before Returns the file $value, removing all but digit characters
stringarray
Full path of file to change or $_FILES data array
\Zend\Filter\Exception\RuntimeException |
---|
string
array
The new filename which has been set, or false when there were errorsgetOptions() : array
inherited_from | \Zend\Filter\AbstractFilter::getOptions() |
---|
array
getOverwrite() : boolean
boolean
getRandomize() : boolean
boolean
getTarget() : string
string
Target file path or directorygetUseUploadName() : boolean
boolean
hasPcreUnicodeSupport() : bool
inherited_from | \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
---|
bool
setOptions(array | \Traversable $options) : \Zend\Filter\AbstractFilter
inherited_from | \Zend\Filter\AbstractFilter::setOptions() |
---|
array\Traversable
\Zend\Filter\Exception\InvalidArgumentException |
---|
setRandomize(boolean $flag) : \Zend\Filter\File\RenameUpload
boolean
Shall target files have a random postfix attached?
setUseUploadName(boolean $flag) : \Zend\Filter\File\RenameUpload
boolean
When true, this filter will use the $_FILES['name'] as the target filename. Otherwise, it uses the default 'target' rules.
applyRandomToFilename(string $filename) : string
string
string
checkFileExists(string $targetFile)
string
Target file path
\Zend\Filter\Exception\InvalidArgumentException |
---|
getFinalTarget(array $uploadData) : string
array
$_FILES array
string
isOptions(mixed $options) : bool
inherited_from | \Zend\Filter\AbstractFilter::isOptions() |
---|
mixed
bool
moveUploadedFile(string $sourceFile, string $targetFile) : boolean
string
Source file path
string
Target file path
\Zend\Filter\Exception\RuntimeException |
---|
boolean
$alreadyFiltered : array