Method | Description | |
---|---|---|
__construct ( $accessKeyId, $secretAccessKey, $region, $endpoint = null ) | ||
clearBucket ( string $bucket ) : integer | Helper used to clear the contents of a bucket. Use the {@see ClearBucket} object directly for more advanced options and control. | |
copyObject ( string $sourceBucket, string $sourceKey, string $targetBucket, string $targetKey, array $params = [] ) : mixed | Creates a copy of an object that is already stored in Amazon S3. | |
createBucket ( string $bucket, array $params = [] ) : mixed | Creates a new bucket. | |
deleteBucket ( $bucket ) : mixed | Deletes the bucket. | |
deleteMatchingObjects ( string $bucket, string $prefix = '', string $regex = '', array $options = [] ) : integer | Deletes objects from Amazon S3 that match the result of a ListObjects operation. For example, this allows you to do things like delete all objects that match a specific key prefix. | |
deleteObject ( string $bucket, string $key, array $params = [] ) : mixed | Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. | |
deleteObjects ( string $bucket, array $objects ) : mixed | This operation enables you to delete multiple objects from a bucket using a single HTTP request. | |
doesBucketExist ( string $bucket, boolean $accept403 = true, array $params = [] ) : boolean | Determines whether or not a bucket exists by name | |
doesObjectExist ( string $bucket, string $key, array $params = [] ) : boolean | Determines whether or not an object exists by name | |
downloadBucket ( string $directory, string $bucket, string $keyPrefix = '', array $options = [] ) | Downloads a bucket to the local filesystem | |
getBucketAcl ( string $bucket ) : mixed | Get access control policy for the bucket | |
getBucketLocation ( string $bucket ) : mixed | Returns the region the bucket resides in. | |
getBucketPolicy ( string $bucket ) : mixed | Returns the policy of a specified bucket. | |
getListBucketsIterator ( ) : mixed | Get array of buckets Available keys: Name, CreationDate | |
getListObjectsIterator ( string $bucket, array $params = [] ) : mixed | Get objects iterator | |
getObject ( string $bucket, string $key, array $params = [] ) : mixed | Get object identified by bucket and key | |
getObjectAcl ( $bucket, $key ) : mixed | Returns the access control list (ACL) of an object. | |
getObjectUrl ( string $bucket, string $key, mixed $expires = null, array $args = [] ) : string | Returns the URL to an object identified by its bucket and key. If an expiration time is provided, the URL will be signed and set to expire at the provided time. | |
listBuckets ( ) : mixed | Returns a list of all buckets owned by the authenticated sender of the request. | |
listObjects ( string $bucket, array $params = [] ) : mixed | Returns some or all (up to 1000) of the objects in a bucket. | |
multipartUpload ( $bucket, $key, $sourcePath, integer $concurrency = 1 ) : mixed | In case of large files, use the multipartUpload method, so the file is sent in chunks to S3, without the need to read the complete file in memory. | |
putBucketAcl ( string $bucket, string $acl ) : mixed | Sets the permissions on a bucket using access control lists (ACL). | |
putObject ( string $bucket, string $key, string $content, array $params = [] ) : mixed | Adds an object to a bucket. | |
putObjectAcl ( string $bucket, string $key, string $acl ) : mixed | Set the access control list (ACL) permissions for an object that already exists in a bucket | |
restoreObject ( string $bucket, string $key, integer $days ) : mixed | Restores an archived copy of an object back into Amazon S3 | |
uploadDirectory ( string $directory, string $bucket, string $keyPrefix = null, array $options = [] ) | Recursively uploads all files in a given directory to a given bucket. |
public __construct ( $accessKeyId, $secretAccessKey, $region, $endpoint = null ) | ||
$accessKeyId | ||
$secretAccessKey | ||
$region | ||
$endpoint |
public clearBucket ( string $bucket ) : integer | ||
$bucket | string | Name of the bucket to clear. |
return | integer | Returns the number of deleted keys |
public deleteBucket ( $bucket ) : mixed | ||
$bucket | ||
return | mixed |
public deleteMatchingObjects ( string $bucket, string $prefix = '', string $regex = '', array $options = [] ) : integer | ||
$bucket | string | Bucket that contains the object keys |
$prefix | string | Optionally delete only objects under this key prefix |
$regex | string | Delete only objects that match this regex |
$options | array | Options used when deleting the object: - before_delete: Callback to invoke before each delete. The callback will receive a Guzzle\Common\Event object with context. |
return | integer | Returns the number of deleted keys |
public downloadBucket ( string $directory, string $bucket, string $keyPrefix = '', array $options = [] ) | ||
$directory | string | Directory to download to |
$bucket | string | Bucket to download from |
$keyPrefix | string | Only download objects that use this key prefix |
$options | array | Associative array of download options - params: Array of parameters to use with each GetObject operation performed during the transfer - base_dir: Base directory to remove from each object key when storing in the local filesystem - force: Set to true to download every file, even if the file is already on the local filesystem and has not changed - concurrency: Maximum number of parallel downloads (defaults to 10) - debug: Set to true or a fopen resource to enable debug mode to print information about each download - allow_resumable: Set to true to allow previously interrupted downloads to be resumed using a Range GET |
public getBucketAcl ( string $bucket ) : mixed | ||
$bucket | string | |
return | mixed |
public getBucketLocation ( string $bucket ) : mixed | ||
$bucket | string | |
return | mixed |
public getBucketPolicy ( string $bucket ) : mixed | ||
$bucket | string | |
return | mixed |
public getListBucketsIterator ( ) : mixed | ||
return | mixed |
public getObjectAcl ( $bucket, $key ) : mixed | ||
$bucket | ||
$key | ||
return | mixed |
public getObjectUrl ( string $bucket, string $key, mixed $expires = null, array $args = [] ) : string | ||
$bucket | string | The name of the bucket where the object is located |
$key | string | The key of the object |
$expires | mixed | The time at which the URL should expire |
$args | array | Arguments to the GetObject command. Additionally you can specify a "Scheme" if you would like the URL to use a different scheme than what the client is configured to use |
return | string | The URL to the object |
public listBuckets ( ) : mixed | ||
return | mixed |
public multipartUpload ( $bucket, $key, $sourcePath, integer $concurrency = 1 ) : mixed | ||
$bucket | ||
$key | ||
$sourcePath | ||
$concurrency | integer | |
return | mixed |
public uploadDirectory ( string $directory, string $bucket, string $keyPrefix = null, array $options = [] ) | ||
$directory | string | Full path to a directory to upload |
$bucket | string | Name of the bucket |
$keyPrefix | string | Virtual directory key prefix to add to each upload |
$options | array | Associative array of upload options - params: Array of parameters to use with each PutObject operation performed during the transfer - base_dir: Base directory to remove from each object key - force: Set to true to upload every file, even if the file is already in Amazon S3 and has not changed - concurrency: Maximum number of parallel uploads (defaults to 10) - debug: Set to true or an fopen resource to enable debug mode to print information about each upload - multipart_upload_size: When the size of a file exceeds this value, the file will be uploaded using a multipart upload. |