Zend Framework
1.12
|
Public Member Functions | |
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 () |
Retrieve progress of transfer. | |
Public Attributes | |
const | FILTER = 'FILTER' |
@+ Plugin loader Constants | |
const | VALIDATE = 'VALIDATE' |
Protected Member Functions | |
_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 Member Functions | |
static | _toByteString ($size) |
Returns the formatted size. | |
Protected Attributes | |
$_break = array() | |
$_filters = array() | |
$_loaders = array() | |
$_messages = array() | |
$_translator | |
$_translatorDisabled = false | |
$_validators = array() | |
$_files = array() | |
$_tmpDir | |
$_options | |
Available options for file transfers. | |
|
protected |
Internal method to detect the size of a file.
array | $value | File infos |
|
protected |
Internal method to detect the mime type of a file.
array | $value | File infos |
|
protected |
Internal function to filter all given files.
string | array | $files | (Optional) Files to check |
|
protected |
Returns found files based on internal file array and given files.
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 |
Zend_File_Transfer_Exception | On false filename |
|
protected |
Retrieve internal identifier for a named filter.
string | $name |
|
protected |
Determine system TMP directory and detect if we have read access.
Zend_File_Transfer_Exception | if unable to determine directory |
|
protected |
Retrieve internal identifier for a named validator.
string | $name |
|
protected |
Tries to detect if we can read and write to the given path.
string | $path |
|
staticprotected |
Returns the formatted size.
integer | $size |
addFile | ( | $file, | |
$validator = null , |
|||
$filter = null |
|||
) |
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 |
Zend_File_Transfer_Exception | Not implemented |
addFilter | ( | $filter, | |
$options = null , |
|||
$files = null |
|||
) |
Adds a new filter for this class.
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 |
addFilters | ( | array | $filters, |
$files = null |
|||
) |
Add Multiple filters at once.
array | $filters | |
string | array | $files |
addPrefixPath | ( | $prefix, | |
$path, | |||
$type = null |
|||
) |
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:
Otherwise, the path prefix is set on the appropriate plugin loader.
string | $prefix | |
string | $path | |
string | $type |
Zend_File_Transfer_Exception | for invalid type |
addPrefixPaths | ( | array | $spec | ) |
addType | ( | $type, | |
$validator = null , |
|||
$filter = null |
|||
) |
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 |
Zend_File_Transfer_Exception | Not implemented |
addValidator | ( | $validator, | |
$breakChainOnFailure = false , |
|||
$options = null , |
|||
$files = null |
|||
) |
Adds a new validator for this class.
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 |
addValidators | ( | array | $validators, |
$files = null |
|||
) |
Add Multiple validators at once.
array | $validators | |
string | array | $files |
clearFilters | ( | ) |
Remove all filters.
clearValidators | ( | ) |
Remove all validators.
getDestination | ( | $files = null | ) |
Retrieve destination directory value.
null | string | array | $files |
Zend_File_Transfer_Exception |
getErrors | ( | ) |
Retrieve error codes.
getFile | ( | ) |
Returns all set files.
Zend_File_Transfer_Exception | Not implemented |
getFileInfo | ( | $file = null | ) |
Retrieve additional internal file informations for files.
string | $file | (Optional) File to get informations for |
getFileName | ( | $file = null , |
|
$path = true |
|||
) |
Retrieves the filename of transferred files.
string | null | $file | |
boolean | $path | (Optional) Should the path also be returned ? |
getFileSize | ( | $files = null | ) |
Returns the real filesize of the file.
string | array | $files | Files to get the filesize from |
Zend_File_Transfer_Exception | When the file does not exist |
getFilter | ( | $name | ) |
Retrieve individual filter.
string | $name |
getFilters | ( | $files = null | ) |
Returns all set filters.
string | array | $files | (Optional) Returns the filter for this files |
Zend_File_Transfer_Exception | When file not found |
getHash | ( | $hash = 'crc32' , |
|
$files = null |
|||
) |
Returns the hash for a given file.
string | $hash | Hash algorithm to use |
string | array | $files | Files to return the hash for |
Zend_File_Transfer_Exception | On unknown hash algorithm |
getMessages | ( | ) |
Returns found validation messages.
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.
string | array | $files | Files to get the mimetype from |
Zend_File_Transfer_Exception | When the file does not exist |
getOptions | ( | $files = null | ) |
Returns set options for adapters or files.
array | $files | (Optional) Files to return the options for |
getPluginLoader | ( | $type | ) |
Retrieve plugin loader for validator or filter chain.
Instantiates with default rules if none available for that type. Use 'filter' or 'validate' for $type.
string | $type |
Zend_File_Transfer_Exception | on invalid type. |
|
static |
Retrieve progress of transfer.
getTranslator | ( | ) |
Retrieve localization translator object.
getType | ( | ) |
Returns all set types.
Zend_File_Transfer_Exception | Not implemented |
getValidator | ( | $name | ) |
Retrieve individual validator.
string | $name |
getValidators | ( | $files = null | ) |
Returns all set validators.
string | array | $files | (Optional) Returns the validator for this files |
hasErrors | ( | ) |
Are there errors registered?
hasFilter | ( | $name | ) |
Determine if a given filter has already been registered.
string | $name |
hasValidator | ( | $name | ) |
Determine if a given validator has already been registered.
string | $name |
|
abstract |
Has the file been filtered ?
array | string | null | $files |
|
abstract |
Is file received?
array | string | null | $files |
|
abstract |
Is file sent?
array | string | null | $files |
|
abstract |
Has a file been uploaded ?
array | string | null | $files |
isValid | ( | $files = null | ) |
Checks if the files are valid.
string | array | $files | (Optional) Files to check |
|
abstract |
Receive file.
mixed | $options |
removeFilter | ( | $name | ) |
removeValidator | ( | $name | ) |
|
abstract |
Send file.
mixed | $options |
setDestination | ( | $destination, | |
$files = null |
|||
) |
Sets a new destination for the given files.
string | $destination | New destination directory |
string | array | $files | Files to set the new destination for |
Zend_File_Transfer_Exception | when the given destination is not a directory or does not exist |
setDisableTranslator | ( | $flag | ) |
Indicate whether or not translation should be disabled.
bool | $flag |
setFilters | ( | array | $filters, |
$files = null |
|||
) |
Sets a filter for the class, erasing all previous set.
string | array | $filter | Filter to set |
string | array | $files | Files to limit this filter to |
setOptions | ( | $options = array() , |
|
$files = null |
|||
) |
Sets Options for adapters.
array | $options | Options to set |
array | $files | (Optional) Files to set the options for |
setPluginLoader | ( | Zend_Loader_PluginLoader_Interface | $loader, |
$type | |||
) |
Set plugin loader to use for validator or filter chain.
Zend_Loader_PluginLoader_Interface | $loader | |
string | $type | 'filter', or 'validate' |
Zend_File_Transfer_Exception | on invalid type |
setTranslator | ( | $translator = null | ) |
Set translator object for localization.
Zend_Translate | null | $translator |
Zend_File_Transfer_Exception |
setValidators | ( | array | $validators, |
$files = null |
|||
) |
Sets a validator for the class, erasing all previous set.
string | array | $validator | Validator to set |
string | array | $files | Files to limit this validator to |
translatorIsDisabled | ( | ) |
Is translation disabled?
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Available options for file transfers.
|
protected |
|
protected |
|
protected |
|
protected |
const FILTER = 'FILTER' |
@+ Plugin loader Constants
const VALIDATE = 'VALIDATE' |