Gets the number of Amazon S3 objects in the specified bucket.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the bucket to use. |
Returns
Type |
Description |
---|---|
The number of Amazon S3 objects in the bucket. |
Examples
Get the number of objects inside the bucket.
// Instantiate the class $s3 = new AmazonS3(); $bucket = 'my-bucket' . strtolower($s3->key); $response = $s3->get_bucket_object_count($bucket); // Success? var_dump($response);
Source
Method defined in services/s3.class.php | Toggle source view (11 lines) | View on GitHub