Documentation

AbstractUploader extends AbstractUploadManager
in package

Table of Contents

$source  : StreamInterface
__construct()  : mixed
createPart()  : array<string|int, mixed>|null
Generates the parameters for an upload part by analyzing a range of the source starting from the current offset up to the part size.
getNumberOfParts()  : mixed
getUploadCommands()  : mixed
limitPartStream()  : LimitStream
Create a stream for a part that starts at the current position and has a length of the upload part size (or less with the final part).
determineSource()  : StreamInterface
Turns the provided source into a stream and stores it.
isEof()  : bool
Checks if the source is at EOF.

Properties

Methods

createPart()

Generates the parameters for an upload part by analyzing a range of the source starting from the current offset up to the part size.

protected abstract createPart(bool $seekable, int $number) : array<string|int, mixed>|null
Parameters
$seekable : bool
$number : int
Return values
array<string|int, mixed>|null

getNumberOfParts()

protected getNumberOfParts(mixed $partSize) : mixed
Parameters
$partSize : mixed
Return values
mixed

getUploadCommands()

protected getUploadCommands(callable $resultHandler) : mixed
Parameters
$resultHandler : callable
Return values
mixed

determineSource()

Turns the provided source into a stream and stores it.

private determineSource(mixed $source) : StreamInterface

If a string is provided, it is assumed to be a filename, otherwise, it passes the value directly to Psr7\stream_for().

Parameters
$source : mixed
Return values
StreamInterface

isEof()

Checks if the source is at EOF.

private isEof(bool $seekable) : bool
Parameters
$seekable : bool
Return values
bool

Search results