__construct()
__invoke()
filter()
getOptions()
getOverwrite()
getRandomize()
getTarget()
getUseUploadExtension()
getUseUploadName()
hasPcreUnicodeSupport()
setOptions()
setOverwrite()
setRandomize()
setTarget()
setUseUploadExtension()
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() : bool
bool
getRandomize() : bool
bool
getTarget() : string
string
Target file path or directorygetUseUploadExtension() : bool
bool
getUseUploadName() : bool
bool
hasPcreUnicodeSupport() : bool
inherited_from | \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
---|
bool
setOptions(array | \Traversable $options) : \Zend\Filter\self
inherited_from | \Zend\Filter\AbstractFilter::setOptions() |
---|
array\Traversable
\Zend\Filter\Exception\InvalidArgumentException |
---|
\Zend\Filter\self
setOverwrite(bool $flag) : \Zend\Filter\File\self
bool
Shall existing files be overwritten?
\Zend\Filter\File\self
setRandomize(bool $flag) : \Zend\Filter\File\self
bool
Shall target files have a random postfix attached?
\Zend\Filter\File\self
setTarget(string $target) : \Zend\Filter\File\self
string
Target file path or directory
\Zend\Filter\File\self
setUseUploadExtension(bool $flag) : \Zend\Filter\File\self
bool
When true, this filter will use the original file extension for the target filename
\Zend\Filter\File\self
setUseUploadName(bool $flag) : \Zend\Filter\File\self
bool
When true, this filter will use the $_FILES['name'] as the target filename. Otherwise, it uses the default 'target' rules.
\Zend\Filter\File\self
applyRandomToFilename(string $source, string $filename) : string
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) : bool
string
Source file path
string
Target file path
\Zend\Filter\Exception\RuntimeException |
---|
bool
$alreadyFiltered : array