Gets whether or not the specified Amazon S3 bucket has a bucket policy associated with it.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the bucket to use. |
Returns
Type |
Description |
---|---|
A value of |
Examples
Check if a bucket policy exists.
// Instantiate the class $s3 = new AmazonS3(); $bucket = 'my-bucket' . strtolower($s3->key); $response = $s3->if_bucket_policy_exists($bucket); // Success? (Boolean, not a CFResponse object) var_dump($response);Result:
bool(true)
Source
Method defined in services/s3.class.php | Toggle source view (18 lines) | View on GitHub