__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)
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() : bool
boolgetRandomize() : bool
boolgetTarget() : string
stringTarget file path or directorygetUseUploadExtension() : bool
boolgetUseUploadName() : bool
boolhasPcreUnicodeSupport() : bool
| inherited_from | \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
|---|
boolsetOptions(array | \Traversable $options) : \Zend\Filter\self
| inherited_from | \Zend\Filter\AbstractFilter::setOptions() |
|---|
array\Traversable
\Zend\Filter\Exception\InvalidArgumentException |
|---|
\Zend\Filter\selfsetOverwrite(bool $flag) : \Zend\Filter\File\self
boolShall existing files be overwritten?
\Zend\Filter\File\selfsetRandomize(bool $flag) : \Zend\Filter\File\self
boolShall target files have a random postfix attached?
\Zend\Filter\File\selfsetTarget(string $target) : \Zend\Filter\File\self
stringTarget file path or directory
\Zend\Filter\File\selfsetUseUploadExtension(bool $flag) : \Zend\Filter\File\self
boolWhen true, this filter will use the original file extension for the target filename
\Zend\Filter\File\selfsetUseUploadName(bool $flag) : \Zend\Filter\File\self
boolWhen true, this filter will use the $_FILES['name'] as the target filename. Otherwise, it uses the default 'target' rules.
\Zend\Filter\File\selfapplyRandomToFilename(string $source, string $filename) : string
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) : bool
stringSource file path
stringTarget file path
\Zend\Filter\Exception\RuntimeException |
|---|
bool$alreadyFiltered : array