Documentation

Grantee
in package
implements ToArrayInterface

Amazon S3 Grantee model

Table of Contents

Interfaces

ToArrayInterface
An object that can be represented as an array

Properties

$displayName  : string
$headerMap  : array<string|int, mixed>
$id  : string
$type  : string

Methods

__construct()  : mixed
Constructs a Grantee
getDisplayName()  : string
Gets the grantee display name
getEmailAddress()  : null|string
Gets the grantee email address (if it is set)
getGroupUri()  : null|string
Gets the grantee URI (if it is set)
getHeaderValue()  : string
Returns the value used in headers to specify this grantee
getId()  : string
Gets the grantee identifier
getType()  : string
Gets the grantee type (determined by ID)
isAmazonCustomerByEmail()  : bool
Returns true if this grantee object represents a customer by email
isCanonicalUser()  : bool
Returns true if this grantee object represents a canonical user by ID
isGroup()  : bool
Returns true if this grantee object represents a group by URL
setDisplayName()  : Grantee
Sets the display name of the grantee
setId()  : Grantee
Sets the account ID, email, or URL identifying the grantee
toArray()  : array<string|int, mixed>
Get the array representation of an object

Properties

$displayName

protected string $displayName

The display name of the grantee

$headerMap

protected static array<string|int, mixed> $headerMap = array(\Aws\S3\Enum\GranteeType::USER => 'id', \Aws\S3\Enum\GranteeType::EMAIL => 'emailAddress', \Aws\S3\Enum\GranteeType::GROUP => 'uri')

A map of grantee types to grant header value prefixes

$id

protected string $id

The account ID, email, or URL identifying the grantee

$type

protected string $type

The type of the grantee (CanonicalUser or Group)

Methods

__construct()

Constructs a Grantee

public __construct(string $id[, string $displayName = null ][, string $expectedType = null ]) : mixed
Parameters
$id : string

Grantee identifier

$displayName : string = null

Grantee display name

$expectedType : string = null

The expected type of the grantee

getDisplayName()

Gets the grantee display name

public getDisplayName() : string
Return values
string

getEmailAddress()

Gets the grantee email address (if it is set)

public getEmailAddress() : null|string
Return values
null|string

getGroupUri()

Gets the grantee URI (if it is set)

public getGroupUri() : null|string
Return values
null|string

getHeaderValue()

Returns the value used in headers to specify this grantee

public getHeaderValue() : string
Return values
string

getId()

Gets the grantee identifier

public getId() : string
Return values
string

getType()

Gets the grantee type (determined by ID)

public getType() : string
Return values
string

isAmazonCustomerByEmail()

Returns true if this grantee object represents a customer by email

public isAmazonCustomerByEmail() : bool
Return values
bool

isCanonicalUser()

Returns true if this grantee object represents a canonical user by ID

public isCanonicalUser() : bool
Return values
bool

isGroup()

Returns true if this grantee object represents a group by URL

public isGroup() : bool
Return values
bool

setDisplayName()

Sets the display name of the grantee

public setDisplayName(string $displayName) : Grantee
Parameters
$displayName : string

Grantee name

Tags
throws
LogicException

when the grantee type not CanonicalUser

Return values
Grantee

setId()

Sets the account ID, email, or URL identifying the grantee

public setId(string $id[, string $expectedType = null ]) : Grantee
Parameters
$id : string

Grantee identifier

$expectedType : string = null

The expected type of the grantee

Tags
throws
UnexpectedValueException

if $expectedType is set and the grantee is not of that type after instantiation

throws
InvalidArgumentException

when the ID provided is not a string

Return values
Grantee

toArray()

Get the array representation of an object

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

        
On this page

Search results