Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
Zend_File_Transfer_Adapter_Http Class Reference

Public Member Functions

 __construct ($options=array())
 Constructor for Http File Transfers.
 
 setValidators (array $validators, $files=null)
 Sets a validator for the class, erasing all previous set.
 
 removeValidator ($name)
 Remove an individual validator.
 
 clearValidators ()
 Remove an individual validator.
 
 send ($options=null)
 Send the file to the client (Download)
 
 isValid ($files=null)
 Checks if the files are valid.
 
 receive ($files=null)
 Receive the file from the client (Upload)
 
 isSent ($files=null)
 Checks if the file was already sent.
 
 isReceived ($files=null)
 Checks if the file was already received.
 
 isFiltered ($files=null)
 Checks if the file was already filtered.
 
 isUploaded ($files=null)
 Has a file been uploaded ?
 
- Public Member Functions inherited from Zend_File_Transfer_Adapter_Abstract
 send ($options=null)
 Send file.
 
 receive ($options=null)
 Receive file.
 
 isSent ($files=null)
 Is file sent?
 
 isReceived ($files=null)
 Is file received?
 
 isUploaded ($files=null)
 Has a file been uploaded ?
 
 isFiltered ($files=null)
 Has the file been filtered ?
 
 setPluginLoader (Zend_Loader_PluginLoader_Interface $loader, $type)
 Set plugin loader to use for validator or filter chain.
 
 getPluginLoader ($type)
 Retrieve plugin loader for validator or filter chain.
 
 addPrefixPath ($prefix, $path, $type=null)
 Add prefix path for plugin loader.
 
 addPrefixPaths (array $spec)
 Add many prefix paths at once.
 
 addValidator ($validator, $breakChainOnFailure=false, $options=null, $files=null)
 Adds a new validator for this class.
 
 addValidators (array $validators, $files=null)
 Add Multiple validators at once.
 
 setValidators (array $validators, $files=null)
 Sets a validator for the class, erasing all previous set.
 
 hasValidator ($name)
 Determine if a given validator has already been registered.
 
 getValidator ($name)
 Retrieve individual validator.
 
 getValidators ($files=null)
 Returns all set validators.
 
 removeValidator ($name)
 Remove an individual validator.
 
 clearValidators ()
 Remove all validators.
 
 setOptions ($options=array(), $files=null)
 Sets Options for adapters.
 
 getOptions ($files=null)
 Returns set options for adapters or files.
 
 isValid ($files=null)
 Checks if the files are valid.
 
 getMessages ()
 Returns found validation messages.
 
 getErrors ()
 Retrieve error codes.
 
 hasErrors ()
 Are there errors registered?
 
 addFilter ($filter, $options=null, $files=null)
 Adds a new filter for this class.
 
 addFilters (array $filters, $files=null)
 Add Multiple filters at once.
 
 setFilters (array $filters, $files=null)
 Sets a filter for the class, erasing all previous set.
 
 hasFilter ($name)
 Determine if a given filter has already been registered.
 
 getFilter ($name)
 Retrieve individual filter.
 
 getFilters ($files=null)
 Returns all set filters.
 
 removeFilter ($name)
 Remove an individual filter.
 
 clearFilters ()
 Remove all filters.
 
 getFile ()
 Returns all set files.
 
 getFileName ($file=null, $path=true)
 Retrieves the filename of transferred files.
 
 getFileInfo ($file=null)
 Retrieve additional internal file informations for files.
 
 addFile ($file, $validator=null, $filter=null)
 Adds one or more files.
 
 getType ()
 Returns all set types.
 
 addType ($type, $validator=null, $filter=null)
 Adds one or more type of files.
 
 setDestination ($destination, $files=null)
 Sets a new destination for the given files.
 
 getDestination ($files=null)
 Retrieve destination directory value.
 
 setTranslator ($translator=null)
 Set translator object for localization.
 
 getTranslator ()
 Retrieve localization translator object.
 
 setDisableTranslator ($flag)
 Indicate whether or not translation should be disabled.
 
 translatorIsDisabled ()
 Is translation disabled?
 
 getHash ($hash= 'crc32', $files=null)
 Returns the hash for a given file.
 
 getFileSize ($files=null)
 Returns the real filesize of the file.
 
 getMimeType ($files=null)
 Returns the real mimetype of the file Uses fileinfo, when not available mime_magic and as last fallback a manual given mimetype.
 

Static Public Member Functions

static getProgress ($id=null)
 Returns the actual progress of file up-/downloads.
 
static isApcAvailable ()
 Checks the APC extension for progress information.
 
static isUploadProgressAvailable ()
 Checks the UploadProgress extension for progress information.
 
- Static Public Member Functions inherited from Zend_File_Transfer_Adapter_Abstract
static getProgress ()
 Retrieve progress of transfer.
 

Protected Member Functions

 _prepareFiles ()
 Prepare the $_FILES array to match the internal syntax of one file per entry.
 
- Protected Member Functions inherited from Zend_File_Transfer_Adapter_Abstract
 _detectFileSize ($value)
 Internal method to detect the size of a file.
 
 _detectMimeType ($value)
 Internal method to detect the mime type of a file.
 
 _filter ($files=null)
 Internal function to filter all given files.
 
 _getTmpDir ()
 Determine system TMP directory and detect if we have read access.
 
 _isPathWriteable ($path)
 Tries to detect if we can read and write to the given path.
 
 _getFiles ($files, $names=false, $noexception=false)
 Returns found files based on internal file array and given files.
 
 _getValidatorIdentifier ($name)
 Retrieve internal identifier for a named validator.
 
 _getFilterIdentifier ($name)
 Retrieve internal identifier for a named filter.
 

Static Protected Attributes

static $_callbackApc = 'apc_fetch'
 
static $_callbackUploadProgress = 'uploadprogress_get_info'
 

Additional Inherited Members

- Public Attributes inherited from Zend_File_Transfer_Adapter_Abstract
const FILTER = 'FILTER'
 @+ Plugin loader Constants
 
const VALIDATE = 'VALIDATE'
 
- Static Protected Member Functions inherited from Zend_File_Transfer_Adapter_Abstract
static _toByteString ($size)
 Returns the formatted size.
 
- Protected Attributes inherited from Zend_File_Transfer_Adapter_Abstract
 $_break = array()
 
 $_filters = array()
 
 $_loaders = array()
 
 $_messages = array()
 
 $_translator
 
 $_translatorDisabled = false
 
 $_validators = array()
 
 $_files = array()
 
 $_tmpDir
 
 $_options
 Available options for file transfers.
 

Constructor & Destructor Documentation

__construct (   $options = array())

Constructor for Http File Transfers.

Parameters
array$optionsOPTIONAL Options to set

Member Function Documentation

_prepareFiles ( )
protected

Prepare the $_FILES array to match the internal syntax of one file per entry.

Parameters
array$files
Returns
array
clearValidators ( )

Remove an individual validator.

Parameters
string$name
Returns
Zend_File_Transfer_Adapter_Abstract
static getProgress (   $id = null)
static

Returns the actual progress of file up-/downloads.

Parameters
string$idThe upload to get the progress for
Returns
array|null
static isApcAvailable ( )
static

Checks the APC extension for progress information.

Returns
boolean
isFiltered (   $files = null)

Checks if the file was already filtered.

Parameters
string | array$files(Optional) Files to check
Returns
bool
isReceived (   $files = null)

Checks if the file was already received.

Parameters
string | array$files(Optional) Files to check
Returns
bool
isSent (   $files = null)

Checks if the file was already sent.

Parameters
string | array$fileFiles to check
Returns
bool
Exceptions
Zend_File_Transfer_ExceptionNot implemented
isUploaded (   $files = null)

Has a file been uploaded ?

Parameters
array | string | null$file
Returns
bool
static isUploadProgressAvailable ( )
static

Checks the UploadProgress extension for progress information.

Returns
boolean
isValid (   $files = null)

Checks if the files are valid.

Parameters
string | array$files(Optional) Files to check
Returns
boolean True if all checks are valid
receive (   $files = null)

Receive the file from the client (Upload)

Parameters
string | array$files(Optional) Files to receive
Returns
bool
removeValidator (   $name)

Remove an individual validator.

Parameters
string$name
Returns
Zend_File_Transfer_Adapter_Abstract
send (   $options = null)

Send the file to the client (Download)

Parameters
string | array$optionsOptions for the file(s) to send
Returns
void
Exceptions
Zend_File_Transfer_ExceptionNot implemented
setValidators ( array  $validators,
  $files = null 
)

Sets a validator for the class, erasing all previous set.

Parameters
string | array$validatorValidator to set
string | array$filesFiles to limit this validator to
Returns
Zend_File_Transfer_Adapter

Member Data Documentation

$_callbackApc = 'apc_fetch'
staticprotected
$_callbackUploadProgress = 'uploadprogress_get_info'
staticprotected