FileDownloadHandler
extends AbstractDownloadHandler
in package
implements
ResumableDownloadHandlerInterface
FinalYes
Table of Contents
Interfaces
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
boolgetDestination()
public
getDestination() : string
Return values
stringgetFixedPartSize()
public
getFixedPartSize() : int
Return values
intgetHandlerResult()
Returns the handler result.
public
getHandlerResult() : string
Return values
stringgetResumeFilePath()
public
getResumeFilePath() : string
Return values
stringgetTemporaryFilePath()
public
getTemporaryFilePath() : string
Return values
stringinitializeDestination()
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
Return values
boolisFailsWhenDestinationExists()
public
isFailsWhenDestinationExists() : bool
Return values
boolpriority()
To provide an order on which listener is notified first.
public
priority() : int
By default, it will provide a neutral value.
Return values
inttransferComplete()
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>