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

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

Class AwsResourceIterator

Iterate over a client command

Guzzle\Common\AbstractHasDispatcher implements Guzzle\Common\HasDispatcherInterface
Extended by Guzzle\Service\Resource\ResourceIterator implements Guzzle\Service\Resource\ResourceIteratorInterface
Extended by Aws\Common\Iterator\AwsResourceIterator

Direct known subclasses

Aws\Ec2\Iterator\DescribeInstancesIterator, Aws\S3\Iterator\ListBucketsIterator, Aws\S3\Iterator\ListMultipartUploadsIterator, Aws\S3\Iterator\ListObjectsIterator, Aws\S3\Iterator\ListObjectVersionsIterator

Namespace: Aws\Common\Iterator
Located at Aws/Common/Iterator/AwsResourceIterator.php

Methods summary

  • public getLastResult ( )

    Provides access to the most recent result obtained by the iterator. This makes it easier to extract any additional information from the result which you do not have access to from the values emitted by the iterator

  • protected sendRequest ( )

    Send a request to retrieve the next page of results. Hook for subclasses to implement. This AWS specific version of the resource iterator provides a default implementation of the typical AWS iterator process. It relies on configuration and extension to implement the operation-specific logic of handling results and nextTokens. This method will loop until resources are acquired or there are no more iterations available.

  • protected prepareRequest ( )
  • protected handleResults ( Guzzle\Service\Resource\Model $result )
  • protected applyNextToken ( )
  • protected determineNextToken ( Guzzle\Service\Resource\Model $result )
  • protected getValueFromResult ( Guzzle\Service\Resource\Model $result, string $key )

    Extracts the value from the result using Collection::getPath. Also adds some additional logic for keys that need to access n-1 indexes (e.g., ImportExport, Kinesis). The n-1 logic only works for the known cases. We will switch to a jmespath implementation in the future to cover all cases

Methods detail

# public Guzzle\Service\Resource\Model|null
getLastResult( )

Provides access to the most recent result obtained by the iterator. This makes it easier to extract any additional information from the result which you do not have access to from the values emitted by the iterator

Returns

Guzzle\Service\Resource\Model|null
# protected array
sendRequest( )

Send a request to retrieve the next page of results. Hook for subclasses to implement. This AWS specific version of the resource iterator provides a default implementation of the typical AWS iterator process. It relies on configuration and extension to implement the operation-specific logic of handling results and nextTokens. This method will loop until resources are acquired or there are no more iterations available.

Returns

array
Returns the newly loaded resources
# protected
prepareRequest( )
# protected
handleResults( Guzzle\Service\Resource\Model $result )
# protected
applyNextToken( )
# protected
determineNextToken( Guzzle\Service\Resource\Model $result )
# protected mixed|null
getValueFromResult( Guzzle\Service\Resource\Model $result, string $key )

Extracts the value from the result using Collection::getPath. Also adds some additional logic for keys that need to access n-1 indexes (e.g., ImportExport, Kinesis). The n-1 logic only works for the known cases. We will switch to a jmespath implementation in the future to cover all cases

Parameters

$result
Guzzle\Service\Resource\Model
$result
$key
string
$key

Returns

mixed|null

Methods inherited from Guzzle\Service\Resource\ResourceIterator

__construct(), calculatePageSize(), count(), current(), get(), getAllEvents(), getNextToken(), getRequestCount(), key(), next(), resetState(), rewind(), set(), setLimit(), setPageSize(), toArray(), valid()

Methods inherited from Guzzle\Common\AbstractHasDispatcher

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

Magic methods summary

Properties summary

protected Guzzle\Service\Resource\Model $lastResult
#

Result of a command

Properties inherited from Guzzle\Service\Resource\ResourceIterator

$command, $data, $invalid, $iteratedCount, $limit, $nextToken, $originalCommand, $pageSize, $requestCount, $resources, $retrievedCount

Properties inherited from Guzzle\Common\AbstractHasDispatcher

$eventDispatcher

AWS SDK for PHP API documentation generated by ApiGen 2.8.0