Retrieve progress of transfer
static float
getProgress
()
Redefined in descendants as:
Returns the formatted size
static string
_toByteString
(integer $size)
Adds one or more files
-
string|array
$file: File to add
-
string|array
$validator: Validators to use for this file, must be set before
-
string|array
$filter: Filters to use for this file, must be set before
Adds a new filter for this class
Zend_File_Transfer_Adapter
addFilter
(string|array $filter, [string|array $options = null], [string|array $files = null])
-
string|array
$filter: Type of filter to add
-
string|array
$options: Options to set for the filter
-
string|array
$files: Files to limit this filter to
Add Multiple filters at once
-
array
$filters
-
string|array
$files
Add prefix path for plugin loader
If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules:
- filters: $prefix = $prefix . '_Filter'
- validators: $prefix = $prefix . '_Validate'
Otherwise, the path prefix is set on the appropriate plugin loader.
-
string
$prefix
-
string
$path
-
string
$type
Add many prefix paths at once
Adds one or more type of files
-
string|array
$type: Type of files to add
-
string|array
$validator: Validators to use for this file, must be set before
-
string|array
$filter: Filters to use for this file, must be set before
Adds a new validator for this class
Zend_File_Transfer_Adapter
addValidator
(string|array $validator, [boolean $breakChainOnFailure = false], [string|array $options = null], [string|array $files = null])
-
string|array
$validator: Type of validator to add
-
boolean
$breakChainOnFailure: If the validation chain should stop an failure
-
string|array
$options: Options to set for the validator
-
string|array
$files: Files to limit this validator to
Add Multiple validators at once
-
array
$validators
-
string|array
$files
Remove all validators
Redefined in descendants as:
Retrieve destination directory value
null|string|array
getDestination
([null|string|array $files = null])
Retrieve error codes
array
getErrors
()
Returns all set files
array
getFile
()
Retrieve additional internal file informations for files
array
getFileInfo
([string $file = null])
-
string
$file: (Optional) File to get informations for
Retrieves the filename of transferred files.
string|array
getFileName
([ $file = null], [boolean $path = true], string $fileelement)
-
string
$fileelement: (Optional) Element to return the filename for
-
boolean
$path: (Optional) Should the path also be returned ?
-
$file
Returns the real filesize of the file
string|array
getFileSize
([string|array $files = null])
-
string|array
$files: Files to get the filesize from
Retrieve individual filter
Returns all set filters
array
getFilters
([string|array $files = null])
-
string|array
$files: (Optional) Returns the filter for this files
Returns the hash for a given file
string|array
getHash
([string $hash = 'crc32'], [string|array $files = null])
-
string
$hash: Hash algorithm to use
-
string|array
$files: Files to return the hash for
Returns found validation messages
array
getMessages
()
Returns the real mimetype of the file Uses fileinfo, when not available mime_magic and as last fallback a manual given mimetype
string|array
getMimeType
([string|array $files = null])
-
string|array
$files: Files to get the mimetype from
Returns set options for adapters or files
array
getOptions
([array $files = null])
-
array
$files: (Optional) Files to return the options for
Retrieve plugin loader for validator or filter chain
Instantiates with default rules if none available for that type. Use 'filter' or 'validate' for $type.
Retrieve localization translator object
Returns all set types
array
getType
()
Retrieve individual validator
Returns all set validators
null|array
getValidators
([string|array $files = null])
-
string|array
$files: (Optional) Returns the validator for this files
Are there errors registered?
boolean
hasErrors
()
Determine if a given filter has already been registered
bool
hasFilter
(string $name)
Determine if a given validator has already been registered
bool
hasValidator
(string $name)
Has the file been filtered ?
bool
isFiltered
([array|string|null $files = null])
Redefined in descendants as:
Is file received?
bool
isReceived
([array|string|null $files = null])
Redefined in descendants as:
Is file sent?
bool
isSent
([array|string|null $files = null])
Redefined in descendants as:
Has a file been uploaded ?
bool
isUploaded
([array|string|null $files = null])
Redefined in descendants as:
Checks if the files are valid
boolean
isValid
([string|array $files = null])
-
string|array
$files: (Optional) Files to check
Redefined in descendants as:
Receive file
bool
receive
([mixed $options = null])
Redefined in descendants as:
Remove an individual filter
Remove an individual validator
Redefined in descendants as:
Send file
bool
send
([mixed $options = null])
Redefined in descendants as:
Sets a new destination for the given files
Zend_File_Transfer_Abstract
setDestination
(string $destination, [string|array $files = null])
-
string
$destination: New destination directory
-
string|array
$files: Files to set the new destination for
Indicate whether or not translation should be disabled
Zend_File_Transfer_Abstract
setDisableTranslator
(bool $flag)
Sets a filter for the class, erasing all previous set
Zend_File_Transfer_Adapter
setFilters
( $filters, [string|array $files = null], string|array $filter)
-
string|array
$filter: Filter to set
-
string|array
$files: Files to limit this filter to
-
array
$filters
Sets Options for adapters
void
setOptions
([array $options = array()], [array $files = null])
-
array
$options: Options to set
-
array
$files: (Optional) Files to set the options for
Set plugin loader to use for validator or filter chain
Set translator object for localization
Zend_File_Transfer_Abstract
setTranslator
([
Zend_Translate|null $translator =
null])
Sets a validator for the class, erasing all previous set
Zend_File_Transfer_Adapter
setValidators
( $validators, [string|array $files = null], string|array $validator)
-
string|array
$validator: Validator to set
-
string|array
$files: Files to limit this validator to
-
array
$validators
Redefined in descendants as:
Is translation disabled?
bool
translatorIsDisabled
()
Internal method to detect the size of a file
string
_detectFileSize
(array $value)
Internal method to detect the mime type of a file
string
_detectMimeType
(array $value)
Internal function to filter all given files
boolean
_filter
([string|array $files = null])
-
string|array
$files: (Optional) Files to check
Returns found files based on internal file array and given files
array
_getFiles
(string|array $files, [boolean $names = false], [boolean $noexception = false])
-
string|array
$files: (Optional) Files to return
-
boolean
$names: (Optional) Returns only names on true, else complete info
-
boolean
$noexception: (Optional) Allows throwing an exception, otherwise returns an empty array
Retrieve internal identifier for a named filter
string
_getFilterIdentifier
(string $name)
Determine system TMP directory and detect if we have read access
string
_getTmpDir
()
Retrieve internal identifier for a named validator
string
_getValidatorIdentifier
(string $name)
Tries to detect if we can read and write to the given path
void
_isPathWriteable
(string $path)