SDK for PHP V3

ResumableUpload extends AbstractResumableTransfer
in package

FinalYes

Table of Contents

Methods

__construct()  : mixed
deleteResumeFile()  : void
fromFile()  : self
Load a resumable state from a file.
fromJson()  : self
Deserialize a resumable state from JSON format.
getBucket()  : string
getConfig()  : array<string|int, mixed>
getCurrentSnapshot()  : array<string|int, mixed>
getKey()  : string
getObjectSize()  : int
getPartsCompleted()  : array<string|int, mixed>
getPartSize()  : int
getRequestArgs()  : array<string|int, mixed>
getResumeFilePath()  : string
getSource()  : string
getUploadId()  : string
isFullObjectChecksum()  : bool
isResumeFile()  : bool
Check if a file path is a valid resume file.
markPartCompleted()  : void
Mark a part as completed.
toFile()  : void
Save the resumable state to a file.
toJson()  : string
Serialize the resumable state to JSON format.
updateCurrentSnapshot()  : void
Update the current snapshot.

Methods

__construct()

public __construct(string $resumeFilePath, array<string|int, mixed> $requestArgs, array<string|int, mixed> $config, array<string|int, mixed> $currentSnapshot, string $uploadId, array<string|int, mixed> $partsCompleted, string $source, int $objectSize, int $partSize, bool $isFullObjectChecksum) : mixed
Parameters
$resumeFilePath : string
$requestArgs : array<string|int, mixed>
$config : array<string|int, mixed>
$currentSnapshot : array<string|int, mixed>
$uploadId : string
$partsCompleted : array<string|int, mixed>
$source : string
$objectSize : int
$partSize : int
$isFullObjectChecksum : bool

deleteResumeFile()

public deleteResumeFile([string|null $filePath = null ]) : void
Parameters
$filePath : string|null = null

fromFile()

Load a resumable state from a file.

public static fromFile(string $filePath) : self
Parameters
$filePath : string
Return values
self

fromJson()

Deserialize a resumable state from JSON format.

public static fromJson(string $json) : self
Parameters
$json : string
Return values
self

getBucket()

public getBucket() : string
Return values
string

getConfig()

public getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCurrentSnapshot()

public getCurrentSnapshot() : array<string|int, mixed>
Return values
array<string|int, mixed>

getKey()

public getKey() : string
Return values
string

getObjectSize()

public getObjectSize() : int
Return values
int

getPartsCompleted()

public getPartsCompleted() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPartSize()

public getPartSize() : int
Return values
int

getRequestArgs()

public getRequestArgs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResumeFilePath()

public getResumeFilePath() : string
Return values
string

getSource()

public getSource() : string
Return values
string

getUploadId()

public getUploadId() : string
Return values
string

isFullObjectChecksum()

public isFullObjectChecksum() : bool
Return values
bool

isResumeFile()

Check if a file path is a valid resume file.

public static isResumeFile(string $filePath) : bool
Parameters
$filePath : string
Return values
bool

markPartCompleted()

Mark a part as completed.

public markPartCompleted(int $partNumber, array<string|int, mixed> $part) : void
Parameters
$partNumber : int

The part number to mark as completed

$part : array<string|int, mixed>

toFile()

Save the resumable state to a file.

public toFile([string|null $filePath = null ]) : void

When a file path is not provided by default it will use the resumeFilePath property.

Parameters
$filePath : string|null = null

Path where the resume file should be saved

toJson()

Serialize the resumable state to JSON format.

public toJson() : string
Return values
string

updateCurrentSnapshot()

Update the current snapshot.

public updateCurrentSnapshot(array<string|int, mixed> $snapshot) : void
Parameters
$snapshot : array<string|int, mixed>

The new snapshot data

<-- modeled_exceptions -->
On this page