NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class AcpBuilder

Builder for creating Access Control Policies

Namespace: Aws\S3\Model
Located at Aws/S3/Model/AcpBuilder.php

## Methods summary

- `public static` `newInstance ( )`

  Static method for chainable instantiation

- `public` `setOwner ( string $id, string $displayName = null )`

  Sets the owner to be set on the ACL

- `public` `addGrantForUser ( string $permission, string $id, string $displayName = null )`

  Create and store a Grant with a CanonicalUser Grantee for the ACL

- `public` `addGrantForEmail ( string $permission, string $email )`

  Create and store a Grant with a AmazonCustomerByEmail Grantee for the ACL

- `public` `addGrantForGroup ( string $permission, string $group )`

  Create and store a Grant with a Group Grantee for the ACL

- `public` `addGrant ( string $permission, Aws\S3\Model\Grantee $grantee )`

  Create and store a Grant for the ACL

- `public` `build ( )`

  Builds the ACP and returns it

## Methods detail

# `public static static`
`newInstance( )`

Static method for chainable instantiation

#### Returns

`static`
# `public mixed`
`setOwner( string $id, string $displayName = null )`

Sets the owner to be set on the ACL

#### Parameters

$id
  `string`
  $id Owner identifier
$displayName
  `string`
  $displayName Owner display name

#### Returns

`mixed`
$this
# `public mixed`
`addGrantForUser( string $permission, string $id, string $displayName = null )`

Create and store a Grant with a CanonicalUser Grantee for the ACL

#### Parameters

$permission
  `string`
  $permission Permission for the Grant
$id
  `string`
  $id Grantee identifier
$displayName
  `string`
  $displayName Grantee display name

#### Returns

`mixed`
$this
# `public mixed`
`addGrantForEmail( string $permission, string $email )`

Create and store a Grant with a AmazonCustomerByEmail Grantee for the ACL

#### Parameters

$permission
  `string`
  $permission Permission for the Grant
$email
  `string`
  $email Grantee email address

#### Returns

`mixed`
$this
# `public mixed`
`addGrantForGroup( string $permission, string $group )`

Create and store a Grant with a Group Grantee for the ACL

#### Parameters

$permission
  `string`
  $permission Permission for the Grant
$group
  `string`
  $group Grantee group

#### Returns

`mixed`
$this
# `public mixed`
`addGrant( string $permission, `Aws\S3\Model\Grantee` $grantee )`

Create and store a Grant for the ACL

#### Parameters

$permission
  `string`
  $permission Permission for the Grant
$grantee
  ``Aws\S3\Model\Grantee``
  $grantee The Grantee for the Grant

#### Returns

`mixed`
$this
# `public `Aws\S3\Model\Acp``
`build( )`

Builds the ACP and returns it

#### Returns

``Aws\S3\Model\Acp``

### Magic methods summary

## Properties summary

`protected `Aws\S3\Model\Grantee`` | $owner | # The owner for the ACL
`protected array` | $grants | # An array of Grant objects for the ACL