PostObject
in package
Tags
Table of Contents
- $bucket : mixed
- $client : mixed
- $formAttributes : mixed
- $formInputs : mixed
- $jsonPolicy : mixed
- __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.
- getPolicyAndSignature() : mixed
- generateUri() : mixed
Properties
$bucket
private
mixed
$bucket
$client
private
mixed
$client
$formAttributes
private
mixed
$formAttributes
$formInputs
private
mixed
$formInputs
$jsonPolicy
private
mixed
$jsonPolicy
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.
Return values
mixed —getBucket()
Gets the bucket name.
public
getBucket() : string
Return values
string —getClient()
Gets the S3 client.
public
getClient() : S3ClientInterface
Return values
S3ClientInterface —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.
Return values
mixed —setFormInput()
Set a form input.
public
setFormInput(string $field, string $value) : mixed
Parameters
- $field : string
-
Field name to set
- $value : string
-
Value to set.
Return values
mixed —getPolicyAndSignature()
protected
getPolicyAndSignature(CredentialsInterface $creds) : mixed
Parameters
- $creds : CredentialsInterface
Return values
mixed —generateUri()
private
generateUri() : mixed