Services_Amazon_S3
[ class tree: Services_Amazon_S3 ] [ index: Services_Amazon_S3 ] [ all elements ]

Class: Services_Amazon_S3_AccessControlList

Source Location: /Services_Amazon_S3-0.4.0/Services/Amazon/S3/AccessControlList.php

Class Overview


This class represents an access control list for a bucket or an object.


Author(s):

Version:

  • Release: @release-version@

Copyright:

  • 2008 Peytz & Co. A/S

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 84]
This class represents an access control list for a bucket or an object.

Permissions can be granted to individual users and two predefined groups.

A grantee is represented as an associate array. $grantee['type'] must be set to either self::TYPE_CANONICAL_USER, self::AMAZON_CUSTOMER_BY_EMAIL or self::TYPE_GROUP.

If type is TYPE_CANONICAL_USER, $grantee['ID'] must be set to a canonical Amazon account id. $grantee['displayName'] may be populated by the server.

If type is TYPE_AMAZON_CUSTOMER_BY_EMAIL, $grantee['emailAddress'] must be set to an email address of an Amazon customer. Note that the server converts this type of grantee to a TYPE_CANONICAL_USER when the ACL is saved and returned in future replies.

If type is TYPE_GROUP, $grantee['URI'] must be set to either self::URI_ALL_USERS or self::URI_AUTHENTICATED_USERS.

Certain common ACL may be specified using the ACL_xxx string constants defined in this class. These are expanded to a full ACL on the server and will result in instances of this class when fetched from the server.



[ Top ]


Class Variables

$resource =

[line 183]

The resource this ACL applies to.
  • Access: public



[ Top ]



Method Detail

getGrantees   [line 227]

array getGrantees( )

Returns an array of grantee arrays.
  • Access: public

[ Top ]

getPermissions   [line 250]

int getPermissions( array $grantee, [bool $implied = false])

Returns the permissions for the specified grantee.
  • Return: a mask of self::ACL_xxx values
  • Access: public

Parameters:

array   $grantee   —  an associative array
bool   $implied   —  if true and $grantee[type] == TYPE_CANONICAL_USER, include implied rights granted to "authenticated users" or "all users"

[ Top ]

load   [line 340]

void load( )

Loads this ACL from the server.
  • Throws: Services_Amazon_S3_Exception
  • Access: public

[ Top ]

save   [line 404]

void save( )

Saves this ACL to the server.
  • Throws: Services_Amazon_S3_Exception
  • Access: public

[ Top ]

setPermissions   [line 286]

int setPermissions( array $grantee, int $permissions)

Returns the permissions for the specified grantee.
  • Return: a mask of self::PERMISSION_xxx flags
  • Access: public

Parameters:

array   $grantee   —  an associative array
int   $permissions   —  a mask of self::ACL_xxx values

[ Top ]

__construct (Constructor)   [line 214]

Services_Amazon_S3_AccessControlList __construct( Services_Amazon_S3_Resource $resource)

Constructor.
  • Access: public

Parameters:

Services_Amazon_S3_Resource   $resource   —  the bucket or object that this ACL applies to

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:49:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.