Documentation

Acp
in package
implements ToArrayInterface, IteratorAggregate, Countable

Amazon S3 Access Control Policy (ACP)

Table of Contents

Interfaces

ToArrayInterface
An object that can be represented as an array
IteratorAggregate
Countable

Properties

$grants  : SplObjectStorage
$owner  : Grantee

Methods

__construct()  : mixed
Constructs an ACP
addGrant()  : $this
Add a Grant
count()  : int
Get the total number of attributes
fromArray()  : Acp
Create an Acp object from an array. This can be used to create an ACP from a response to a GetObject/Bucket ACL operation.
getGrants()  : SplObjectStorage
Get all of the grants
getIterator()  : SplObjectStorage
Returns the grants for iteration
getOwner()  : Grantee
Get the owner of the ACP policy
setGrants()  : $this
Set the grants for the ACP
setOwner()  : $this
Set the owner of the ACP policy
toArray()  : array<string|int, mixed>
Get the array representation of an object
updateCommand()  : $this
Applies grant headers to a command's parameters

Properties

$grants

protected SplObjectStorage $grants = array()

List of grants on the ACP

Methods

__construct()

Constructs an ACP

public __construct(Grantee $owner[, array<string|int, mixed>|Traversable $grants = null ]) : mixed
Parameters
$owner : Grantee

ACP policy owner

$grants : array<string|int, mixed>|Traversable = null

List of grants for the ACP

addGrant()

Add a Grant

public addGrant(Grant $grant) : $this
Parameters
$grant : Grant

Grant to add

Return values
$this

count()

Get the total number of attributes

public count() : int
Return values
int

fromArray()

Create an Acp object from an array. This can be used to create an ACP from a response to a GetObject/Bucket ACL operation.

public static fromArray(array<string|int, mixed> $data) : Acp
Parameters
$data : array<string|int, mixed>

Array of ACP data

Return values
Acp

getGrants()

Get all of the grants

public getGrants() : SplObjectStorage
Return values
SplObjectStorage

getIterator()

Returns the grants for iteration

public getIterator() : SplObjectStorage
Return values
SplObjectStorage

getOwner()

Get the owner of the ACP policy

public getOwner() : Grantee
Return values
Grantee

setGrants()

Set the grants for the ACP

public setGrants([array<string|int, mixed>|Traversable $grants = array() ]) : $this
Parameters
$grants : array<string|int, mixed>|Traversable = array()

List of grants for the ACP

Tags
throws
InvalidArgumentException
Return values
$this

setOwner()

Set the owner of the ACP policy

public setOwner(Grantee $owner) : $this
Parameters
$owner : Grantee

ACP policy owner

Tags
throws
InvalidArgumentException

if the grantee does not have an ID set

Return values
$this

toArray()

Get the array representation of an object

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

updateCommand()

Applies grant headers to a command's parameters

public updateCommand(AbstractCommand $command) : $this
Parameters
$command : AbstractCommand

Command to be updated

Return values
$this

        
On this page

Search results