addFilter()
addFilters()
addValidator()
addValidators()
clearFilters()
clearValidators()
getDestination()
getErrors()
getFileInfo()
getFileName()
getFileSize()
getFilter()
getFilterManager()
getFilters()
getHash()
getMessages()
getMimeType()
getOptions()
getTranslator()
getTranslatorTextDomain()
getValidator()
getValidatorManager()
getValidators()
hasErrors()
hasFilter()
hasTranslator()
hasValidator()
isFiltered()
isReceived()
isSent()
isTranslatorEnabled()
isUploaded()
isValid()
receive()
removeFilter()
removeValidator()
send()
setDestination()
setFilterManager()
setFilters()
setOptions()
setTranslator()
setTranslatorEnabled()
setTranslatorTextDomain()
setValidatorManager()
setValidators()
detectFileSize()
detectMimeType()
filter()
getFiles()
getFilterIdentifier()
getTmpDir()
getValidatorIdentifier()
isPathWriteable()
toByteString()
$break
$files
$filterManager
$filters
$loaders
$messages
$options
$tmpDir
$translator
$translatorEnabled
$translatorTextDomain
$validatorManager
$validators
FILTER
VALIDATOR
Abstract class for file transfers (Downloads and Uploads)
This class needs a full rewrite. It re-implements functionality present in Zend\Filter\Input and/or Zend\Form\Element, and in a way that's inconsistent with either one. Additionally, plugin loader usage is now deprecated -- but modifying that should be done in tandem with a rewrite to utilize validator and filter chains instead.
todo | Rewrite |
---|
addFilter(string | \Zend\Filter\FilterInterface $filter, string | array $options, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
stringarray
Options to set for the filter
stringarray
Files to limit this filter to
\Zend\File\Transfer\Exception\InvalidArgumentException |
for invalid type |
---|
addFilters(array $filters, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
addValidator(string | \Zend\Validator\ValidatorInterface $validator, bool $breakChainOnFailure, string | array $options, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
bool
If the validation chain should stop a failure
stringarray
Options to set for the validator
stringarray
Files to limit this validator to
\Zend\File\Transfer\Exception\InvalidArgumentException |
for invalid type |
---|
addValidators(array $validators, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
array
stringarray
\Zend\File\Transfer\Exception\InvalidArgumentException |
for invalid type |
---|
clearFilters() : \Zend\File\Transfer\Adapter\AbstractAdapter
clearValidators() : \Zend\File\Transfer\Adapter\AbstractAdapter
getDestination(null | string | array $files) : null | string | array
nullstringarray
\Zend\File\Transfer\Exception\InvalidArgumentException |
---|
null
string
array
getErrors() : array
array
getFileInfo(string $file) : array
string
(Optional) File to get informations for
array
getFileName(string $file, bool $path) : string | array
string
(Optional) Element to return the filename for
bool
(Optional) Should the path also be returned ?
string
array
getFileSize(string | array $files) : string | array
stringarray
Files to get the filesize from
\Zend\File\Transfer\Exception\InvalidArgumentException |
When the file does not exist |
---|
string
array
FilesizegetFilterManager() : \Zend\File\Transfer\Adapter\FilterPluginManager
getFilters(string | array $files) : array
stringarray
(Optional) Returns the filter for this files
\Zend\File\Transfer\Exception\RuntimeException |
When file not found |
---|
array
List of set filtersgetHash(string $hash, string | array $files) : string | array
string
Hash algorithm to use
stringarray
Files to return the hash for
\Zend\File\Transfer\Exception\InvalidArgumentException |
On unknown hash algorithm |
---|
string
array
HashstringgetMessages() : array
array
getMimeType(string | array $files) : string | array
stringarray
Files to get the mimetype from
\Zend\File\Transfer\Exception\InvalidArgumentException |
When the file does not exist |
---|
string
array
MimeTypegetOptions(array $files) : array
array
(Optional) Files to return the options for
array
Options for given filesgetTranslator() : \Zend\I18n\Translator\TranslatorInterface | null
getTranslatorTextDomain() : string
string
getValidator(string $name) : \Zend\Validator\ValidatorInterface | null
getValidatorManager() : \Zend\File\Transfer\Adapter\ValidatorPluginManager
getValidators(string | array $files) : null | array
stringarray
(Optional) Returns the validator for this files
null
array
List of set validatorshasErrors() : bool
bool
hasFilter(string $name) : bool
string
bool
hasTranslator() : bool
bool
hasValidator(string $name) : bool
string
bool
isFiltered(array | string | null $files) : bool
arraystringnull
bool
isReceived(array | string | null $files) : bool
arraystringnull
bool
isSent(array | string | null $files) : bool
arraystringnull
bool
isTranslatorEnabled() : bool
bool
isUploaded(array | string | null $files) : bool
arraystringnull
bool
isValid(string | array $files) : bool
stringarray
(Optional) Files to check
bool
True if all checks are validreceive(mixed $options) : bool
mixed
bool
removeFilter(string $name) : \Zend\File\Transfer\Adapter\AbstractAdapter
removeValidator(string $name) : \Zend\File\Transfer\Adapter\AbstractAdapter
send(mixed $options) : bool
mixed
bool
setDestination(string $destination, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
deprecated | Will be changed to be a filter!!! |
---|
string
New destination directory
stringarray
Files to set the new destination for
\Zend\File\Transfer\Exception\InvalidArgumentException |
when the given destination is not a directory or does not exist |
---|
setFilterManager(\Zend\File\Transfer\Adapter\FilterPluginManager $filterManager) : \Zend\File\Transfer\Adapter\AbstractAdapter
setFilters(array $filters, string | array $files) : \Zend\Filter\AbstractFilter
array
Filter to set
stringarray
Files to limit this filter to
setOptions(array $options, array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
array
Options to set
array
(Optional) Files to set the options for
setTranslator(\Zend\I18n\Translator\TranslatorInterface $translator, string $textDomain) : \Zend\File\Transfer\Adapter\AbstractAdapter
\Zend\I18n\Translator\TranslatorInterface
[optional] translator. Default is null, which sets no translator.
string
[optional] text domain Default is null, which skips setTranslatorTextDomain
setTranslatorEnabled(bool $flag) : \Zend\File\Transfer\Adapter\AbstractAdapter
setTranslatorTextDomain(string $textDomain) : \Zend\File\Transfer\Adapter\AbstractAdapter
setValidatorManager(\Zend\File\Transfer\Adapter\ValidatorPluginManager $validatorManager) : \Zend\File\Transfer\Adapter\AbstractAdapter
setValidators(array $validators, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
array
Validators to set
stringarray
Files to limit this validator to
detectFileSize(array $value) : string
array
File infos
string
Filesize of given filedetectMimeType(array $value) : string
array
File infos
string
Mimetype of given filefilter(string | array $files) : bool
stringarray
(Optional) Files to check
bool
False on errorgetFiles(string | array $files, bool $names, bool $noexception) : array
stringarray
(Optional) Files to return
bool
(Optional) Returns only names on true, else complete info
bool
(Optional) Allows throwing an exception, otherwise returns an empty array
\Zend\File\Transfer\Exception\RuntimeException |
On false filename |
---|
array
Found filesgetFilterIdentifier(string $name) : string
string
string
getTmpDir() : string
\Zend\File\Transfer\Exception\RuntimeException |
if unable to determine directory |
---|
string
getValidatorIdentifier(string $name) : string
string
string
isPathWriteable(string $path) : bool
string
bool
toByteString(int $size) : string
int
string
$break : array
$files : array
$filters : array
$loaders : array
$tmpDir : string
$translatorEnabled : bool
$translatorTextDomain : string
$validators : array
FILTER
VALIDATOR