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
stringarrayOptions to set for the filter
stringarrayFiles 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
boolIf the validation chain should stop a failure
stringarrayOptions to set for the validator
stringarrayFiles 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 |
|---|
nullstringarray
getErrors() : array
arraygetFileInfo(string $file) : array
string(Optional) File to get informations for
arraygetFileName(string $file, bool $path) : string | array
string(Optional) Element to return the filename for
bool(Optional) Should the path also be returned ?
stringarray
getFileSize(string | array $files) : string | array
stringarrayFiles to get the filesize from
\Zend\File\Transfer\Exception\InvalidArgumentException |
When the file does not exist |
|---|
stringarrayFilesizegetFilterManager() : \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 |
|---|
arrayList of set filtersgetHash(string $hash, string | array $files) : string | array
stringHash algorithm to use
stringarrayFiles to return the hash for
\Zend\File\Transfer\Exception\InvalidArgumentException |
On unknown hash algorithm |
|---|
stringarrayHashstringgetMessages() : array
arraygetMimeType(string | array $files) : string | array
stringarrayFiles to get the mimetype from
\Zend\File\Transfer\Exception\InvalidArgumentException |
When the file does not exist |
|---|
stringarrayMimeTypegetOptions(array $files) : array
array(Optional) Files to return the options for
arrayOptions for given filesgetTranslator() : \Zend\I18n\Translator\TranslatorInterface | null
getTranslatorTextDomain() : string
stringgetValidator(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
nullarrayList of set validatorshasErrors() : bool
boolhasFilter(string $name) : bool
string
boolhasTranslator() : bool
boolhasValidator(string $name) : bool
string
boolisFiltered(array | string | null $files) : bool
arraystringnull
boolisReceived(array | string | null $files) : bool
arraystringnull
boolisSent(array | string | null $files) : bool
arraystringnull
boolisTranslatorEnabled() : bool
boolisUploaded(array | string | null $files) : bool
arraystringnull
boolisValid(string | array $files) : bool
stringarray(Optional) Files to check
boolTrue if all checks are validreceive(mixed $options) : bool
mixed
boolremoveFilter(string $name) : \Zend\File\Transfer\Adapter\AbstractAdapter
removeValidator(string $name) : \Zend\File\Transfer\Adapter\AbstractAdapter
send(mixed $options) : bool
mixed
boolsetDestination(string $destination, string | array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
| deprecated | Will be changed to be a filter!!! |
|---|
stringNew destination directory
stringarrayFiles 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
arrayFilter to set
stringarrayFiles to limit this filter to
setOptions(array $options, array $files) : \Zend\File\Transfer\Adapter\AbstractAdapter
arrayOptions 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
arrayValidators to set
stringarrayFiles to limit this validator to
detectFileSize(array $value) : string
arrayFile infos
stringFilesize of given filedetectMimeType(array $value) : string
arrayFile infos
stringMimetype of given filefilter(string | array $files) : bool
stringarray(Optional) Files to check
boolFalse 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 |
|---|
arrayFound filesgetFilterIdentifier(string $name) : string
string
stringgetTmpDir() : string
\Zend\File\Transfer\Exception\RuntimeException |
if unable to determine directory |
|---|
stringgetValidatorIdentifier(string $name) : string
string
stringisPathWriteable(string $path) : bool
string
booltoByteString(int $size) : string
int
string$break : array
$files : array
$filters : array
$loaders : array
$tmpDir : string
$translatorEnabled : bool
$translatorTextDomain : string
$validators : array
FILTER
VALIDATOR