Abstract class for file transfers (Downloads and Uploads)
category | Zend |
---|---|
package | Zend_File_Transfer |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
addFile(string|array $file, string|array $validator= null
, string|array $filter= null
) : \Zend_File_Transfer_Adapter_Abstract
string
array
File to add
string
array
Validators to use for this file, must be set before
string
array
Filters to use for this file, must be set before
\Zend_File_Transfer_Exception |
Not implemented |
---|
\Zend_File_Transfer_Adapter_Abstract
addFilter(string|array $filter, string|array $options= null
, string|array $files= null
) : \Zend_File_Transfer_Adapter
string
array
Type of filter to add
string
array
Options to set for the filter
string
array
Files to limit this filter to
\Zend_File_Transfer_Adapter
addFilters(array $filters, string|array $files = null
) : \Zend_File_Transfer_Adapter_Abstract
array
string
array
\Zend_File_Transfer_Adapter_Abstract
addPrefixPath(string $prefix, string $path, string $type = null
) : \Zend_File_Transfer_Adapter_Abstract
If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules:
Otherwise, the path prefix is set on the appropriate plugin loader.
string
string
string
\Zend_File_Transfer_Exception |
for invalid type |
---|
\Zend_File_Transfer_Adapter_Abstract
addPrefixPaths(array $spec) : \Zend_File_Transfer_Exception
array
\Zend_File_Transfer_Exception
addType(string|array $type, string|array $validator= null
, string|array $filter= null
) : \Zend_File_Transfer_Adapter_Abstract
string
array
Type of files to add
string
array
Validators to use for this file, must be set before
string
array
Filters to use for this file, must be set before
\Zend_File_Transfer_Exception |
Not implemented |
---|
\Zend_File_Transfer_Adapter_Abstract
addValidator(string|array $validator, boolean $breakChainOnFailure= false
, string|array $options= null
, string|array $files= null
) : \Zend_File_Transfer_Adapter
string
array
Type of validator to add
boolean
If the validation chain should stop an failure
string
array
Options to set for the validator
string
array
Files to limit this validator to
\Zend_File_Transfer_Adapter
addValidators(array $validators, string|array $files = null
) : \Zend_File_Transfer_Adapter_Abstract
array
string
array
\Zend_File_Transfer_Adapter_Abstract
clearFilters() : \Zend_File_Transfer_Adapter_Abstract
\Zend_File_Transfer_Adapter_Abstract
clearValidators() : \Zend_File_Transfer_Adapter_Abstract
\Zend_File_Transfer_Adapter_Abstract
getDestination(null|string|array $files = null
) : null | string | array
null
string
array
\Zend_File_Transfer_Exception |
---|
null
string
array
getErrors() : array
array
getFile() : array
\Zend_File_Transfer_Exception |
Not implemented |
---|
array
List of set filesgetFileInfo(string $file = null
) : array
string
(Optional) File to get informations for
array
getFileName(string|null $file= null
, boolean $path= true
) : string | array
string
null
boolean
(Optional) Should the path also be returned ?
string
array
getFileSize(string|array $files = null
) : string | array
string
array
Files to get the filesize from
\Zend_File_Transfer_Exception |
When the file does not exist |
---|
string
array
FilesizegetFilter(string $name) : \Zend_Filter_Interface | null
string
\Zend_Filter_Interface
null
getFilters(string|array $files = null
) : array
string
array
(Optional) Returns the filter for this files
\Zend_File_Transfer_Exception |
When file not found |
---|
array
List of set filtersgetHash(string $hash= 'crc32'
, string|array $files= null
) : string | array
string
Hash algorithm to use
string
array
Files to return the hash for
\Zend_File_Transfer_Exception |
On unknown hash algorithm |
---|
string
array
HashstringgetMessages() : array
array
getMimeType(string|array $files = null
) : string | array
string
array
Files to get the mimetype from
\Zend_File_Transfer_Exception |
When the file does not exist |
---|
string
array
MimeTypegetOptions(array $files = null
) : array
array
(Optional) Files to return the options for
array
Options for given filesgetPluginLoader(string $type) : \Zend_Loader_PluginLoader
Instantiates with default rules if none available for that type. Use 'filter' or 'validate' for $type.
string
\Zend_File_Transfer_Exception |
on invalid type. |
---|
\Zend_Loader_PluginLoader
getProgress() : float
float
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getType() : array
\Zend_File_Transfer_Exception |
Not implemented |
---|
array
List of set typesgetValidator(string $name) : \Zend_Validate_Interface | null
string
\Zend_Validate_Interface
null
getValidators(string|array $files = null
) : null | array
string
array
(Optional) Returns the validator for this files
null
array
List of set validatorshasErrors() : boolean
boolean
hasFilter(string $name) : boolean
string
boolean
hasValidator(string $name) : boolean
string
boolean
isFiltered(array|string|null $files = null
) : boolean
array
string
null
boolean
isReceived(array|string|null $files = null
) : boolean
array
string
null
boolean
isSent(array|string|null $files = null
) : boolean
array
string
null
boolean
isUploaded(array|string|null $files = null
) : boolean
array
string
null
boolean
isValid(string|array $files = null
) : boolean
string
array
(Optional) Files to check
boolean
True if all checks are validreceive(mixed $options = null
) : boolean
mixed
boolean
removeFilter(string $name) : \Zend_File_Transfer_Adapter_Abstract
string
\Zend_File_Transfer_Adapter_Abstract
removeValidator(string $name) : \Zend_File_Transfer_Adapter_Abstract
string
\Zend_File_Transfer_Adapter_Abstract
send(mixed $options = null
) : boolean
mixed
boolean
setDestination(string $destination, string|array $files = null
) : \Zend_File_Transfer_Abstract
deprecated | Will be changed to be a filter!!! |
---|
string
New destination directory
string
array
Files to set the new destination for
\Zend_File_Transfer_Exception |
when the given destination is not a directory or does not exist |
---|
\Zend_File_Transfer_Abstract
setDisableTranslator(boolean $flag) : \Zend_File_Transfer_Abstract
boolean
\Zend_File_Transfer_Abstract
setFilters(array $filters, string|array $files = null
) : \Zend_File_Transfer_Adapter
string
array
Files to limit this filter to
\Zend_File_Transfer_Adapter
setOptions(array $options= array()
, array $files= null
) : \Zend_File_Transfer_Adapter_Abstract
array
Options to set
array
(Optional) Files to set the options for
\Zend_File_Transfer_Adapter_Abstract
setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader, string $type) : \Zend_File_Transfer_Adapter_Abstract
\Zend_Loader_PluginLoader_Interface
string
'filter', or 'validate'
\Zend_File_Transfer_Exception |
on invalid type |
---|
\Zend_File_Transfer_Adapter_Abstract
setTranslator(\Zend_Translate|null $translator = null
) : \Zend_File_Transfer_Abstract
\Zend_Translate
null
\Zend_File_Transfer_Exception |
---|
\Zend_File_Transfer_Abstract
setValidators(array $validators, string|array $files = null
) : \Zend_File_Transfer_Adapter
string
array
Files to limit this validator to
\Zend_File_Transfer_Adapter
translatorIsDisabled() : boolean
boolean
_detectFileSize(array $value) : string
array
File infos
string
Filesize of given file_detectMimeType(array $value) : string
array
File infos
string
Mimetype of given file_filter(string|array $files = null
) : boolean
string
array
(Optional) Files to check
boolean
False on error_getFiles(string|array $files, boolean $names= false
, boolean $noexception= false
) : array
string
array
(Optional) Files to return
boolean
(Optional) Returns only names on true, else complete info
boolean
(Optional) Allows throwing an exception, otherwise returns an empty array
\Zend_File_Transfer_Exception |
On false filename |
---|
array
Found files_getFilterIdentifier(string $name) : string
string
string
_getTmpDir() : string
\Zend_File_Transfer_Exception |
if unable to determine directory |
---|
string
_getValidatorIdentifier(string $name) : string
string
string
_isPathWriteable(string $path) : boolean
string
boolean
_toByteString(integer $size) : string
integer
string
$_break : array
array()
$_files : array
array()
$_filters : array
array()
$_loaders : array
array()
$_tmpDir : string
$_translator : \Zend_Translate
$_translatorDisabled : boolean
false
$_validators : array
array()
FILTER = 'FILTER'
VALIDATE = 'VALIDATE'