Base class for all protocols supporting file transfers

package Default

 Methods

Calls all methods from the adapter

__call(string $method, array $options) : mixed

Parameters

$method

string

Method to call

$options

array

Options for this method

Exceptions

\Zend\File\Transfer\Exception\BadMethodCallException if unknown method

Returns

mixed

Creates a file processing handler

__construct(string $adapter = 'Http', boolean $direction = false, array $options = array()

Parameters

$adapter

string

Adapter to use

$direction

boolean

OPTIONAL False means Download, true means upload

$options

array

OPTIONAL Options to set for this adapter

Exceptions

\Zend\File\Transfer\Exception\InvalidArgumentException

Returns all set adapters

getAdapter(boolean $direction = null) : array | \Zend\File\Transfer\Adapter\AbstractAdapter

Parameters

$direction

boolean

On null, all directions are returned On false, download direction is returned On true, upload direction is returned

Returns

array\Zend\File\Transfer\Adapter\AbstractAdapter

Sets a new adapter

setAdapter(string $adapter, boolean $direction = false, array $options = array()) : \Zend\File\Transfer\Transfer

Parameters

$adapter

string

Adapter to use

$direction

boolean

OPTIONAL False means Download, true means upload

$options

array

OPTIONAL Options to set for this adapter

Exceptions

\Zend\File\Transfer\Exception\InvalidArgumentException

Returns

\Zend\File\Transfer\Transfer

 Properties

 

Array holding all directions

$adapter : array

Default

array()