FileDownload
in package
Binary file contents and response headers returned by a download operation.
The SDK keeps binary data in memory until the application reads data or calls saveTo().
Table of Contents
Properties
Methods
- __construct() : mixed
- Creates an in-memory download result.
- saveTo() : void
- Writes the complete binary response body to a local path.
Properties
$data
Raw binary response body.
public
string
$data
$headers
public
array<string, string>
$headers
= []
Response headers keyed by normalized header name.
Methods
__construct()
Creates an in-memory download result.
public
__construct(string $data[, array<string, string> $headers = [] ]) : mixed
Parameters
- $data : string
-
Raw binary response body.
- $headers : array<string, string> = []
-
Response headers keyed by normalized header name.
saveTo()
Writes the complete binary response body to a local path.
public
saveTo(string $path) : void
Parameters
- $path : string
-
Destination path writable by the current PHP process.