Documentation

AbstractUploadPart
in package
implements UploadPartInterface

AbstractYes

An object that encapsulates the data for an upload part

Table of Contents

Interfaces

UploadPartInterface
An object that encapsulates the data for an upload part

Properties

$keyMap  : array<string|int, mixed>
$partNumber  : int

Methods

fromArray()  : self
Create an upload part from an array
getPartNumber()  : int
Returns the part number of the upload part which is used as an identifier
serialize()  : mixed
{@inheritdoc}
toArray()  : array<string|int, mixed>
Returns the array form of the upload part
unserialize()  : mixed
{@inheritdoc}
loadData()  : mixed
Loads an array of data into the upload part by extracting only the needed keys

Properties

$keyMap

protected static array<string|int, mixed> $keyMap = array()

A map of external array keys to internal property names

$partNumber

protected int $partNumber

The number of the upload part representing its order in the overall upload

Methods

fromArray()

Create an upload part from an array

public static fromArray(mixed $data) : self
Parameters
$data : mixed

Data representing the upload part

Return values
self

getPartNumber()

Returns the part number of the upload part which is used as an identifier

public getPartNumber() : int
Return values
int

toArray()

Returns the array form of the upload part

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

unserialize()

{@inheritdoc}

public unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed

loadData()

Loads an array of data into the upload part by extracting only the needed keys

protected loadData(array<string|int, mixed>|Traversable $data) : mixed
Parameters
$data : array<string|int, mixed>|Traversable

Data to load into the upload part value object

Tags
throws
InvalidArgumentException

if a required key is missing


        
On this page

Search results