SDK for PHP V3

FileDownloadHandler extends AbstractDownloadHandler
in package
implements ResumableDownloadHandlerInterface

FinalYes

Table of Contents

Interfaces

ResumableDownloadHandlerInterface

Constants

PROGRESS_SNAPSHOT_KEY  = 'progress_snapshot'
REASON_KEY  = 'reason'
REQUEST_ARGS_KEY  = 'request_args'

Methods

__construct()  : mixed
bytesTransferred()  : bool
getDestination()  : string
getFixedPartSize()  : int
getHandlerResult()  : string
Returns the handler result.
getResumeFilePath()  : string
getTemporaryFilePath()  : string
initializeDestination()  : void
isConcurrencySupported()  : bool
To control whether the download handler supports concurrency.
isFailsWhenDestinationExists()  : bool
priority()  : int
To provide an order on which listener is notified first.
transferComplete()  : void
transferFail()  : void
transferInitiated()  : void

Constants

PROGRESS_SNAPSHOT_KEY

public mixed PROGRESS_SNAPSHOT_KEY = 'progress_snapshot'

REASON_KEY

public mixed REASON_KEY = 'reason'

REQUEST_ARGS_KEY

public mixed REQUEST_ARGS_KEY = 'request_args'

Methods

__construct()

public __construct(string $destination, bool $failsWhenDestinationExists[, bool $resumeEnabled = false ][, string|null $temporaryFilePath = null ][, int|null $fixedPartSize = null ]) : mixed
Parameters
$destination : string
$failsWhenDestinationExists : bool
$resumeEnabled : bool = false
$temporaryFilePath : string|null = null
$fixedPartSize : int|null = null

bytesTransferred()

public bytesTransferred(array<string|int, mixed> $context) : bool
Parameters
$context : array<string|int, mixed>
Return values
bool

getDestination()

public getDestination() : string
Return values
string

getFixedPartSize()

public getFixedPartSize() : int
Return values
int

getHandlerResult()

Returns the handler result.

public getHandlerResult() : string
Return values
string

getResumeFilePath()

public getResumeFilePath() : string
Return values
string

getTemporaryFilePath()

public getTemporaryFilePath() : string
Return values
string

initializeDestination()

public initializeDestination(array<string|int, mixed> $response) : void
Parameters
$response : array<string|int, mixed>

isConcurrencySupported()

To control whether the download handler supports concurrency.

public isConcurrencySupported() : bool
Tags
inheritDoc
Return values
bool

isFailsWhenDestinationExists()

public isFailsWhenDestinationExists() : bool
Return values
bool

priority()

To provide an order on which listener is notified first.

public priority() : int

By default, it will provide a neutral value.

Return values
int

transferComplete()

public transferComplete(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>

transferFail()

public transferFail(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>

transferInitiated()

public transferInitiated(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>
<-- modeled_exceptions -->
On this page