\extendDownLoad

Summary

Methods
Properties
Constants
setUrl()
setBurst()
setHeader()
saveFile()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getSiteFiLeInfo()
curl()
getResHeaderValue()
$siteUrl
$header
$burstBytes
N/A

Properties

$siteUrl

$siteUrl : string

远程文件的路径

Type

string

$header

$header : array

Http请求头

Type

array

$burstBytes

$burstBytes : int

分片下载大小

Type

int

Methods

setUrl()

setUrl(string  $url) : $this

设置远程下载文件的路径

Parameters

string $url

远程文件的路径

Returns

$this —

setBurst()

setBurst(int  $byte) : $this

设置分段下载字节大小

Parameters

int $byte

字节大小

Returns

$this —

setHeader()

setHeader(array  $header) : $this

设置Http请求头

Parameters

array $header

请求头

Returns

$this —

saveFile()

saveFile(string  $fileName) : mixed

保存文件到本地

Parameters

string $fileName

保存到本地的文件名称

Throws

Returns

mixed —

getSiteFiLeInfo()

getSiteFiLeInfo() : array

获取远程文件的信息

Throws

\Exception

Returns

array —

curl()

curl(string  $range) : array

获取下载文件流

Parameters

string $range

分片字节范围

Throws

Returns

array —

getResHeaderValue()

getResHeaderValue(string  $key, string  $responseHead) : string

获取响应头某个Key的值

Parameters

string $key

header头的key

string $responseHead

header头字符串

Returns

string —