31. Class

31.1. Zend\File\Transfer\Adapter\Http

File transfer adapter class for the HTTP protocol

31.1.1. Methods

31.1.1.1. __construct

__construct()

Constructor for Http File Transfers

Parameters:array – OPTIONAL Options to set
Throws ExceptionPhpEnvironmentException:
 if file uploads are not allowed

31.1.1.2. setValidators

setValidators()

Sets a validator for the class, erasing all previous set

Parameters:
  • array – Validator to set
  • string|array – Files to limit this validator to
Return type:

AbstractAdapter

31.1.1.3. removeValidator

removeValidator()

Remove an individual validator

Parameters:string
Return type:AbstractAdapter

31.1.1.4. clearValidators

clearValidators()

Clear the validators

Return type:AbstractAdapter

31.1.1.5. send

send()

Send the file to the client (Download)

Parameters:string|array – Options for the file(s) to send
Return type:void
Throws :ExceptionBadMethodCallException Not implemented

31.1.1.6. isValid

isValid()

Checks if the files are valid

Parameters:string|array – (Optional) Files to check
Return type:bool True if all checks are valid

31.1.1.7. receive

receive()

Receive the file from the client (Upload)

Parameters:string|array – (Optional) Files to receive
Return type:bool

31.1.1.8. isSent

isSent()

Checks if the file was already sent

Parameters:string|array – Files to check
Return type:bool
Throws :ExceptionBadMethodCallException Not implemented

31.1.1.9. isReceived

isReceived()

Checks if the file was already received

Parameters:string|array – (Optional) Files to check
Return type:bool

31.1.1.10. isFiltered

isFiltered()

Checks if the file was already filtered

Parameters:string|array – (Optional) Files to check
Return type:bool

31.1.1.11. isUploaded

isUploaded()

Has a file been uploaded ?

Parameters:array|string|null
Return type:bool

31.1.1.12. getProgress

getProgress()

Returns the actual progress of file up-/downloads

Parameters:string|array – The upload to get the progress for
Return type:array|null
Throws :ExceptionPhpEnvironmentException whether APC nor UploadProgress extension installed
Throws :ExceptionRuntimeException

31.1.1.13. isApcAvailable

isApcAvailable()

Checks the APC extension for progress information

Return type:bool

31.1.1.14. isUploadProgressAvailable

isUploadProgressAvailable()

Checks the UploadProgress extension for progress information

Return type:bool

31.1.1.15. prepareFiles

prepareFiles()

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

Return type:Http