| Category | Zend |
| Package | Zend_File_Transfer |
| Copyright | Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) |
| License | http://framework.zend.com/license/new-bsd New BSD License |

abstract class Zend_File_Transfer_Adapter_Abstract
| Category | Zend |
| Package | Zend_File_Transfer |
| Copyright | Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) |
| License | http://framework.zend.com/license/new-bsd New BSD License |
| FILTER | |
| VALIDATE |
| # $_break | Internal list of breaks |
| # $_files | Internal list of files |
| # $_filters | Internal list of filters |
| # $_loaders | Plugin loaders for filter and validation chains |
| # $_messages | Internal list of messages |
| # $_options | Available options for file transfers |
| # $_tmpDir | TMP directory |
| # $_translator | |
| # $_translatorDisabled | Is translation disabled? |
| # $_validators | Internal list of validators |
| # _toByteString() | Returns the formatted size |
| + getProgress() | Retrieve progress of transfer |
| # _filter() | Internal function to filter all given files |
| # _getFiles() | Returns found files based on internal file array and given files |
| # _getFilterIdentifier() | Retrieve internal identifier for a named filter |
| # _getTmpDir() | Determine system TMP directory and detect if we have read access |
| # _getValidatorIdentifier() | Retrieve internal identifier for a named validator |
| # _isPathWriteable() | Tries to detect if we can read and write to the given path |
| + addFile() | Adds one or more files |
| + addFilter() | Adds a new filter for this class |
| + addFilters() | Add Multiple filters at once |
| + addPrefixPath() | Add prefix path for plugin loader |
| + addPrefixPaths() | Add many prefix paths at once |
| + addType() | Adds one or more type of files |
| + addValidator() | Adds a new validator for this class |
| + addValidators() | Add Multiple validators at once |
| + clearFilters() | Remove all filters |
| + clearValidators() | Remove all validators |
| + getDestination() | Retrieve destination directory value |
| + getErrors() | Retrieve error codes |
| + getFile() | Returns all set files |
| + getFileInfo() | Retrieve additional internal file informations for files |
| + getFileName() | Retrieves the filename of transferred files |
| + getFileSize() | Returns the real filesize of the file |
| + getFilter() | Retrieve individual filter |
| + getFilters() | Returns all set filters |
| + getHash() | Returns the hash for a given file |
| + getMessages() | Returns found validation messages |
| + getMimeType() | Returns the real mimetype of the file |
| + getOptions() | Returns set options for adapters or files |
| + getPluginLoader() | Retrieve plugin loader for validator or filter chain |
| + getTranslator() | Retrieve localization translator object |
| + getType() | Returns all set types |
| + getValidator() | Retrieve individual validator |
| + getValidators() | Returns all set validators |
| + hasErrors() | Are there errors registered? |
| + hasFilter() | Determine if a given filter has already been registered |
| + hasValidator() | Determine if a given validator has already been registered |
| + isFiltered() | Has the file been filtered ? |
| + isReceived() | Is file received? |
| + isSent() | Is file sent? |
| + isUploaded() | Has a file been uploaded ? |
| + isValid() | Checks if the files are valid |
| + receive() | Receive file |
| + removeFilter() | Remove an individual filter |
| + removeValidator() | Remove an individual validator |
| + send() | Send file |
| + setDestination() | Sets a new destination for the given files |
| + setDisableTranslator() | Indicate whether or not translation should be disabled |
| + setFilters() | Sets a filter for the class, erasing all previous set |
| + setOptions() | Sets Options for adapters |
| + setPluginLoader() | Set plugin loader to use for validator or filter chain |
| + setTranslator() | Set translator object for localization |
| + setValidators() | Sets a validator for the class, erasing all previous set |
| + translatorIsDisabled() | Is translation disabled? |
protected $_break = array()protected $_files = array()protected $_filters = array()protected $_loaders = array()protected $_messages = array()protected $_options = array(
'ignoreNoFile' => false,
'useByteString' => true,
'magicFile' => null
)protected $_translatorDisabled = falseprotected $_validators = array()
protected static function _toByteString( |
$size)
|
integer $size |
public static function getProgress( |
)
|
protected function _filter( |
$files = null)
|
string|array $files |
(Optional) Files to check |
protected function _getFiles( |
$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 function _getFilterIdentifier( |
$name)
|
string $name |
protected function _getTmpDir( |
)
|
Zend_File_Transfer_Exception if unable to determine directory
protected function _getValidatorIdentifier( |
$name)
|
string $name |
protected function _isPathWriteable( |
$path)
|
string $path |
public function addFile( |
$file)
|
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
public function addFilter( |
$filter)
|
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 |
public function addFilters( |
array $filters)
|
array $filters |
|
string|array $files |
public function addPrefixPath( |
$prefix)
|
string $prefix |
|
string $path |
|
string $type |
Zend_File_Transfer_Exception for invalid type
public function addPrefixPaths( |
array $spec)
|
public function addType( |
$type)
|
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
public function addValidator( |
$validator)
|
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 |
public function addValidators( |
array $validators)
|
array $validators |
|
string|array $files |
public function clearFilters( |
)
|
public function clearValidators( |
)
|
public function getDestination( |
$files = null)
|
null|string|array $files |
public function getErrors( |
)
|
public function getFile( |
)
|
Zend_File_Transfer_Exception Not implemented
public function getFileInfo( |
$file = null)
|
string $file |
(Optional) File to get informations for |
public function getFileName( |
$file = null)
|
$file |
|
boolean $path |
(Optional) Should the path also be returned ? |
public function getFileSize( |
$files = null)
|
string|array $files |
Files to get the filesize from |
Zend_File_Transfer_Exception When the file does not exist
public function getFilter( |
$name)
|
public function getFilters( |
$files = null)
|
string|array $files |
(Optional) Returns the filter for this files |
Zend_File_Transfer_Exception When file not found
public function getHash( |
$hash = 'crc32')
|
string $hash |
Hash algorithm to use |
string|array $files |
Files to return the hash for |
Zend_File_Transfer_Exception On unknown hash algorithm
public function getMessages( |
)
|
public function getMimeType( |
$files = null)
|
string|array $files |
Files to get the mimetype from |
Zend_File_Transfer_Exception When the file does not exist
public function getOptions( |
$files = null)
|
array $files |
(Optional) Files to return the options for |
public function getPluginLoader( |
$type)
|
string $type |
Zend_Loader_PluginLoaderZend_File_Transfer_Exception on invalid type.
public function getTranslator( |
)
|
Zend_Translate_Adapter|null
public function getType( |
)
|
Zend_File_Transfer_Exception Not implemented
public function getValidator( |
$name)
|
public function getValidators( |
$files = null)
|
string|array $files |
(Optional) Returns the validator for this files |
public function hasErrors( |
)
|
public function hasFilter( |
$name)
|
string $name |
public function hasValidator( |
$name)
|
string $name |
abstract public function isFiltered( |
$files = null)
|
array|string|null $files |
abstract public function isReceived( |
$files = null)
|
array|string|null $files |
abstract public function isSent( |
$files = null)
|
array|string|null $files |
abstract public function isUploaded( |
$files = null)
|
array|string|null $files |
public function isValid( |
$files = null)
|
string|array $files |
(Optional) Files to check |
abstract public function receive( |
$options = null)
|
mixed $options |
public function removeFilter( |
$name)
|
public function removeValidator( |
$name)
|
abstract public function send( |
$options = null)
|
mixed $options |
public function setDestination( |
$destination)
|
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
public function setDisableTranslator( |
$flag)
|
bool $flag |
public function setFilters( |
array $filters)
|
array $filters |
|
string|array $files |
Files to limit this filter to |
public function setOptions( |
$options = array())
|
array $options |
Options to set |
array $files |
(Optional) Files to set the options for |
public function setPluginLoader( |
)
|
|
|
string $type |
'filter', or 'validate' |
Zend_File_Transfer_Exception on invalid type
public function setTranslator( |
$translator = null)
|
|
public function setValidators( |
array $validators)
|
array $validators |
|
string|array $files |
Files to limit this validator to |
public function translatorIsDisabled( |
)
|