__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)
arraystringThe 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 |
|---|
mixedfilter(string | array $value) : string | array
Renames the file $value to the new name set before Returns the file $value, removing all but digit characters
stringarrayFull path of file to change or $_FILES data array
\Zend\Filter\Exception\RuntimeException |
|---|
stringarrayThe new filename which has been set, or false when there were errorsgetOptions() : array
| inherited_from | \Zend\Filter\AbstractFilter::getOptions() |
|---|
arraygetOverwrite() : boolean
booleangetRandomize() : boolean
booleangetTarget() : string
stringTarget file path or directorygetUseUploadName() : boolean
booleanhasPcreUnicodeSupport() : bool
| inherited_from | \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
|---|
boolsetOptions(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
booleanShall target files have a random postfix attached?
setUseUploadName(boolean $flag) : \Zend\Filter\File\RenameUpload
booleanWhen true, this filter will use the $_FILES['name'] as the target filename. Otherwise, it uses the default 'target' rules.
applyRandomToFilename(string $filename) : string
string
stringcheckFileExists(string $targetFile)
stringTarget file path
\Zend\Filter\Exception\InvalidArgumentException |
|---|
getFinalTarget(array $uploadData) : string
array$_FILES array
stringisOptions(mixed $options) : bool
| inherited_from | \Zend\Filter\AbstractFilter::isOptions() |
|---|
mixed
boolmoveUploadedFile(string $sourceFile, string $targetFile) : boolean
stringSource file path
stringTarget file path
\Zend\Filter\Exception\RuntimeException |
|---|
boolean$alreadyFiltered : array