AWS SDK for PHP
  • Namespace
  • Class
  • Tree
  • Download

Namespaces

  • Aws
    • AutoScaling
      • Enum
      • Exception
    • CloudFormation
      • Enum
      • Exception
    • CloudFront
      • Enum
      • Exception
    • CloudFront_2012_05_05
    • CloudHsm
      • Exception
    • CloudSearch
      • Enum
      • Exception
    • CloudSearch_2011_02_01
    • CloudSearchDomain
      • Exception
    • CloudTrail
      • Exception
    • CloudWatch
      • Enum
      • Exception
    • CloudWatchLogs
      • Exception
    • CodeCommit
      • Exception
    • CodeDeploy
      • Exception
    • CodePipeline
      • Exception
    • CognitoIdentity
      • Exception
    • CognitoSync
      • Exception
    • Common
      • Client
      • Command
      • Credentials
      • Enum
      • Exception
        • Parser
      • Hash
      • InstanceMetadata
        • Waiter
      • Iterator
      • Model
        • MultipartUpload
      • Signature
      • Waiter
    • ConfigService
      • Exception
    • DataPipeline
      • Enum
      • Exception
    • DeviceFarm
      • Exception
    • DirectConnect
      • Enum
      • Exception
    • DirectoryService
      • Exception
    • DynamoDb
      • Enum
      • Exception
      • Model
        • BatchRequest
      • Session
        • LockingStrategy
    • DynamoDb_2011_12_05
    • DynamoDbStreams
      • Exception
    • Ec2
      • Enum
      • Exception
      • Iterator
    • Ecs
      • Exception
    • Efs
      • Exception
    • ElastiCache
      • Enum
      • Exception
    • ElasticBeanstalk
      • Enum
      • Exception
    • ElasticFileSystem
    • ElasticLoadBalancing
      • Exception
    • ElasticTranscoder
      • Exception
    • Emr
      • Enum
      • Exception
    • Glacier
      • Enum
      • Exception
      • Model
        • MultipartUpload
    • Iam
      • Enum
      • Exception
    • ImportExport
      • Enum
      • Exception
    • Kinesis
      • Enum
      • Exception
    • Kms
      • Exception
    • Lambda
      • Exception
    • MachineLearning
      • Exception
    • OpsWorks
      • Enum
      • Exception
    • Rds
      • Enum
      • Exception
    • Redshift
      • Enum
      • Exception
    • Route53
      • Enum
      • Exception
    • Route53Domains
      • Exception
    • S3
      • Command
      • Enum
      • Exception
        • Parser
      • Iterator
      • Model
        • MultipartUpload
      • Sync
    • Ses
      • Enum
      • Exception
    • SimpleDb
      • Exception
    • Sns
      • Exception
      • MessageValidator
        • Exception
    • Sqs
      • Enum
      • Exception
    • Ssm
      • Exception
    • StorageGateway
      • Enum
      • Exception
    • Sts
      • Exception
    • Support
      • Exception
    • Swf
      • Enum
      • Exception
    • WorkSpaces
      • Exception
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP

Classes

  • Acp
  • AcpBuilder
  • ClearBucket
  • DeleteObjectsBatch
  • DeleteObjectsTransfer
  • Grant
  • Grantee
  • PostObject
NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

Class ClearBucket

Class used to clear the contents of a bucket or the results of an iterator

Guzzle\Common\AbstractHasDispatcher implements Guzzle\Common\HasDispatcherInterface
Extended by Aws\S3\Model\ClearBucket
Namespace: Aws\S3\Model
Located at Aws/S3/Model/ClearBucket.php

Methods summary

  • public __construct ( Aws\Common\Client\AwsClientInterface $client, string $bucket )
  • public static getAllEvents ( )

    Get a list of all of the events emitted from the class

  • public setBucket ( string $bucket )

    Set the bucket that is to be cleared

  • public getIterator ( )

    Get the iterator used to yield the keys to be deleted. A default iterator will be created and returned if no iterator has been explicitly set.

  • public setIterator ( Iterator $iterator )

    Sets a different iterator to use than the default iterator. This can be helpful when you wish to delete only specific keys from a bucket (e.g. keys that match a certain prefix or delimiter, or perhaps keys that pass through a filtered, decorated iterator).

  • public setMfa ( string $mfa )

    Set the MFA token to send with each request

  • public clear ( )

    Clear the bucket

Methods detail

# public
__construct( Aws\Common\Client\AwsClientInterface $client, string $bucket )

Parameters

$client
Aws\Common\Client\AwsClientInterface
$client Client used to execute requests
$bucket
string
$bucket Name of the bucket to clear
# public static array
getAllEvents( )

Get a list of all of the events emitted from the class

Returns

array

Overrides

Guzzle\Common\AbstractHasDispatcher::getAllEvents
# public mixed
setBucket( string $bucket )

Set the bucket that is to be cleared

Parameters

$bucket
string
$bucket Name of the bucket to clear

Returns

mixed
$this
# public Iterator
getIterator( )

Get the iterator used to yield the keys to be deleted. A default iterator will be created and returned if no iterator has been explicitly set.

Returns

Iterator
# public mixed
setIterator( Iterator $iterator )

Sets a different iterator to use than the default iterator. This can be helpful when you wish to delete only specific keys from a bucket (e.g. keys that match a certain prefix or delimiter, or perhaps keys that pass through a filtered, decorated iterator).

Parameters

$iterator
Iterator
$iterator Iterator used to yield the keys to be deleted

Returns

mixed
$this
# public mixed
setMfa( string $mfa )

Set the MFA token to send with each request

Parameters

$mfa
string
$mfa MFA token to send with each request. The value is the concatenation of the authentication device's serial number, a space, and the value displayed on your authentication device.

Returns

mixed
$this
# public integer
clear( )

Clear the bucket

Returns

integer
Returns the number of deleted keys

Throws

Guzzle\Common\Exception\ExceptionCollection

Methods inherited from Guzzle\Common\AbstractHasDispatcher

addSubscriber(), dispatch(), getEventDispatcher(), setEventDispatcher()

Magic methods summary

Constants summary

string AFTER_DELETE 'clear_bucket.after_delete'
#

Event emitted when a batch request has completed

string BEFORE_CLEAR 'clear_bucket.before_clear'
#

Event emitted before the bucket is cleared

string AFTER_CLEAR 'clear_bucket.after_clear'
#

Event emitted after the bucket is cleared

Properties summary

protected Aws\Common\Client\AwsClientInterface $client
#

Client used to execute the requests

protected AbstractS3ResourceIterator $iterator
#

Iterator used to yield keys

protected string $mfa
#

MFA used with each request

Properties inherited from Guzzle\Common\AbstractHasDispatcher

$eventDispatcher

AWS SDK for PHP API documentation generated by ApiGen 2.8.0