__construct()
__invoke()
addFile()
filter()
getFile()
getNewName()
getOptions()
hasPcreUnicodeSupport()
setFile()
setOptions()
_convertOptions()
_getFileName()
isOptions()
$files
$options
__construct(string | array | \Traversable $options)
Options argument may be either a string, a Zend\Config\Config object, or an array. If an array or Zend\Config\Config object, it accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the source file 'overwrite' => Shall existing files be overwritten ? 'randomize' => Shall target files have a random postfix attached?
stringarray\Traversable
Target file or directory to be renamed
\Zend\Filter\Exception\InvalidArgumentException |
---|
__invoke(mixed $value) : mixed
Proxies to filter()
inherited_from | \Zend\Filter\AbstractFilter::__invoke() |
---|
mixed
\Zend\Filter\Exception\ExceptionInterface |
If filtering $value is impossible |
---|
mixed
addFile(string | array $options) : \Zend\Filter\File\Rename
Array accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the sourcefile 'overwrite' => Shall existing files be overwritten? 'randomize' => Shall target files have a random postfix attached?
stringarray
Old file or directory to be rewritten
\Zend\Filter\Exception\InvalidArgumentException |
---|
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 setgetFile() : array
array
getNewName(string $value, bool $source) : string
string
Full path of file to change
bool
Return internal informations
\Zend\Filter\Exception\InvalidArgumentException |
If the target file already exists. |
---|
string
The new filename which has been setgetOptions() : array
inherited_from | \Zend\Filter\AbstractFilter::getOptions() |
---|
array
hasPcreUnicodeSupport() : bool
inherited_from | \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
---|
bool
setFile(string | array $options) : \Zend\Filter\File\self
Array accepts the following keys: 'source' => Source filename or directory which will be renamed 'target' => Target filename or directory, the new name of the sourcefile 'overwrite' => Shall existing files be overwritten? 'randomize' => Shall target files have a random postfix attached?
stringarray
Old file or directory to be rewritten
\Zend\Filter\File\self
setOptions(array | \Traversable $options) : \Zend\Filter\self
inherited_from | \Zend\Filter\AbstractFilter::setOptions() |
---|
array\Traversable
\Zend\Filter\Exception\InvalidArgumentException |
---|
\Zend\Filter\self
_convertOptions(array $options) : array
array
array
_getFileName(string $file) : array | string
string
Filename to get the informations for
array
string
isOptions(mixed $options) : bool
inherited_from | \Zend\Filter\AbstractFilter::isOptions() |
---|
mixed
bool
$files