SDK for PHP 3.x

PostObject
in package

Tags
deprecated

Table of Contents

Methods

__construct()  : mixed
Constructs the PostObject.
getBucket()  : string
Gets the bucket name.
getClient()  : S3ClientInterface
Gets the S3 client.
getFormAttributes()  : array<string|int, mixed>
Gets the form attributes as an array.
getFormInputs()  : array<string|int, mixed>
Gets the form inputs as an array.
getJsonPolicy()  : string
Gets the raw JSON policy.
setFormAttribute()  : mixed
Set a form attribute.
setFormInput()  : mixed
Set a form input.

Methods

__construct()

Constructs the PostObject.

public __construct(S3ClientInterface $client, string $bucket, array<string|int, mixed> $formInputs, string|array<string|int, mixed> $jsonPolicy) : mixed
Parameters
$client : S3ClientInterface

Client used with the POST object

$bucket : string

Bucket to use

$formInputs : array<string|int, mixed>

Associative array of form input fields.

$jsonPolicy : string|array<string|int, mixed>

JSON encoded POST policy document. The policy will be base64 encoded and applied to the form on your behalf.

getBucket()

Gets the bucket name.

public getBucket() : string
Return values
string

getFormAttributes()

Gets the form attributes as an array.

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

getFormInputs()

Gets the form inputs as an array.

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

getJsonPolicy()

Gets the raw JSON policy.

public getJsonPolicy() : string
Return values
string

setFormAttribute()

Set a form attribute.

public setFormAttribute(string $attribute, string $value) : mixed
Parameters
$attribute : string

Form attribute to set.

$value : string

Value to set.

setFormInput()

Set a form input.

public setFormInput(string $field, string $value) : mixed
Parameters
$field : string

Field name to set

$value : string

Value to set.

On this page