Base class for all protocols supporting file transfers

 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, bool $direction, array $options) 

Parameters

$adapter

string

Adapter to use

$direction

bool

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(bool $direction) : array | \Zend\File\Transfer\Adapter\AbstractAdapter

Parameters

$direction

bool

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

Returns

Sets a new adapter

setAdapter(string $adapter, bool $direction, array $options) : \Zend\File\Transfer\Transfer

Parameters

$adapter

string

Adapter to use

$direction

bool

OPTIONAL False means Download, true means upload

$options

array

OPTIONAL Options to set for this adapter

Exceptions

\Zend\File\Transfer\Exception\InvalidArgumentException

Returns

 Properties

 

Array holding all directions

$adapter : array