Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Abstract class for file transfers (Downloads and Uploads)
array $_break = 'array'Internal list of breaks
Detailsarray $_files = 'array'Internal list of files This array looks like this: array(form => array( - Form is the name within the form or, if not set the filename name, - Original name of this file type, - Mime type of this file size, - Filesize in bytes tmp_name, - Internalally temporary filename for uploaded files error, - Error which has occured destination, - New destination for this file validators, - Set validator names for this file files - Set file names for this file ))
Detailsarray $_filters = 'array'Internal list of filters
Detailsarray $_loaders = 'array'Plugin loaders for filter and validation chains
Detailsarray $_messages = 'array'Internal list of messages
Details $_options = 'array'Available options for file transfers
Detailsstring $_tmpDir = ''TMP directory
DetailsZend_Translate $_translator = ''
Detailsbool $_translatorDisabled = 'false'Is translation disabled?
Detailsarray $_validators = 'array'Internal list of validators
Details_detectFileSize(
array $value
)
:
stringInternal method to detect the size of a file
Details_detectMimeType(
array $value
)
:
stringInternal method to detect the mime type of a file
Details_filter(
string|array $files
=
null
)
:
booleanInternal function to filter all given files
Details_getFiles(
string|array $files, boolean $names
=
false, boolean $noexception
=
false
)
:
arrayReturns found files based on internal file array and given files
Details_getFilterIdentifier(
string $name
)
:
stringRetrieve internal identifier for a named filter
Details_getTmpDir(
)
:
stringDetermine system TMP directory and detect if we have read access
Details_getValidatorIdentifier(
string $name
)
:
stringRetrieve internal identifier for a named validator
Details_isPathWriteable(
string $path
)
:
Tries to detect if we can read and write to the given path
Details_toByteString(
integer $size
)
:
stringReturns the formatted size
DetailsaddFile(
string|array $file, string|array $validator
=
null, string|array $filter
=
null
)
:
Zend_File_Transfer_Adapter_AbstractAdds one or more files
DetailsaddFilter(
string|array $filter, string|array $options
=
null, string|array $files
=
null
)
:
Zend_File_Transfer_AdapterAdds a new filter for this class
DetailsaddFilters(
array $filters, string|array $files
=
null
)
:
Zend_File_Transfer_Adapter_AbstractAdd Multiple filters at once
DetailsaddPrefixPath(
string $prefix, string $path, string $type
=
null
)
:
Zend_File_Transfer_Adapter_AbstractAdd 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.
DetailsaddPrefixPaths(
array $spec
)
:
Zend_File_Transfer_ExceptionAdd many prefix paths at once
DetailsaddType(
string|array $type, string|array $validator
=
null, string|array $filter
=
null
)
:
Zend_File_Transfer_Adapter_AbstractAdds one or more type of files
DetailsaddValidator(
string|array $validator, boolean $breakChainOnFailure
=
false, string|array $options
=
null, string|array $files
=
null
)
:
Zend_File_Transfer_AdapterAdds a new validator for this class
DetailsaddValidators(
array $validators, string|array $files
=
null
)
:
Zend_File_Transfer_Adapter_AbstractAdd Multiple validators at once
DetailsclearFilters(
)
:
Zend_File_Transfer_Adapter_AbstractRemove all filters
DetailsclearValidators(
)
:
Zend_File_Transfer_Adapter_AbstractRemove all validators
DetailsgetDestination(
null|string|array $files
=
null
)
:
null|string|arrayRetrieve destination directory value
DetailsgetErrors(
)
:
arrayRetrieve error codes
DetailsgetFile(
)
:
arrayReturns all set files
DetailsgetFileInfo(
string $file
=
null
)
:
arrayRetrieve additional internal file informations for files
DetailsgetFileName(
$file
=
null, boolean $path
=
true
)
:
string|arrayRetrieves the filename of transferred files.
DetailsgetFileSize(
string|array $files
=
null
)
:
string|arrayReturns the real filesize of the file
DetailsgetFilter(
string $name
)
:
Zend_Filter_Interface|nullRetrieve individual filter
DetailsgetFilters(
string|array $files
=
null
)
:
arrayReturns all set filters
DetailsgetHash(
string $hash
=
crc32, string|array $files
=
null
)
:
string|arrayReturns the hash for a given file
DetailsgetMessages(
)
:
arrayReturns found validation messages
DetailsgetMimeType(
string|array $files
=
null
)
:
string|arrayReturns the real mimetype of the file Uses fileinfo, when not available mime_magic and as last fallback a manual given mimetype
DetailsgetOptions(
array $files
=
null
)
:
arrayReturns set options for adapters or files
DetailsgetPluginLoader(
string $type
)
:
Zend_Loader_PluginLoaderRetrieve plugin loader for validator or filter chain
Instantiates with default rules if none available for that type. Use 'filter' or 'validate' for $type.
DetailsgetProgress(
)
:
floatRetrieve progress of transfer
DetailsgetTranslator(
)
:
Zend_Translate_Adapter|nullRetrieve localization translator object
DetailsgetType(
)
:
arrayReturns all set types
DetailsgetValidator(
string $name
)
:
Zend_Validate_Interface|nullRetrieve individual validator
DetailsgetValidators(
string|array $files
=
null
)
:
null|arrayReturns all set validators
DetailshasErrors(
)
:
booleanAre there errors registered?
DetailshasFilter(
string $name
)
:
boolDetermine if a given filter has already been registered
DetailshasValidator(
string $name
)
:
boolDetermine if a given validator has already been registered
DetailsisFiltered(
array|string|null $files
=
null
)
:
boolHas the file been filtered ?
DetailsisReceived(
array|string|null $files
=
null
)
:
boolIs file received?
DetailsisSent(
array|string|null $files
=
null
)
:
boolIs file sent?
DetailsisUploaded(
array|string|null $files
=
null
)
:
boolHas a file been uploaded ?
DetailsisValid(
string|array $files
=
null
)
:
booleanChecks if the files are valid
Detailsreceive(
mixed $options
=
null
)
:
boolReceive file
DetailsremoveFilter(
string $name
)
:
Zend_File_Transfer_Adapter_AbstractRemove an individual filter
DetailsremoveValidator(
string $name
)
:
Zend_File_Transfer_Adapter_AbstractRemove an individual validator
Detailssend(
mixed $options
=
null
)
:
boolSend file
DetailssetDestination(
string $destination, string|array $files
=
null
)
:
Zend_File_Transfer_AbstractSets a new destination for the given files
DetailssetDisableTranslator(
bool $flag
)
:
Zend_File_Transfer_AbstractIndicate whether or not translation should be disabled
DetailssetFilters(
$filters, string|array $files
=
null
)
:
Zend_File_Transfer_AdapterSets a filter for the class, erasing all previous set
DetailssetOptions(
array $options
=
array, array $files
=
null
)
:
Sets Options for adapters
DetailssetPluginLoader(
Zend_Loader_PluginLoader_Interface $loader, string $type
)
:
Zend_File_Transfer_Adapter_AbstractSet plugin loader to use for validator or filter chain
DetailssetTranslator(
Zend_Translate|null $translator
=
null
)
:
Zend_File_Transfer_AbstractSet translator object for localization
DetailssetValidators(
$validators, string|array $files
=
null
)
:
Zend_File_Transfer_AdapterSets a validator for the class, erasing all previous set
DetailstranslatorIsDisabled(
)
:
boolIs translation disabled?
Details