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

# Interface FromConfigInterface

Interfaces that adds a factory method which is used to instantiate a class from an array of configuration options.

### Direct known implementers

`Aws\Common\Credentials\Credentials`, `Guzzle\Cache\CacheAdapterFactory`, `Guzzle\Service\ClientInterface`

### Indirect known implementers

`Aws\AutoScaling\AutoScalingClient`, `Aws\CloudFormation\CloudFormationClient`, `Aws\CloudWatchLogs\CloudWatchLogsClient`, `Aws\CodeCommit\CodeCommitClient`, `Aws\CodeDeploy\CodeDeployClient`, `Aws\CodePipeline\CodePipelineClient`, `Aws\CognitoIdentity\CognitoIdentityClient`, `Aws\CognitoSync\CognitoSyncClient`, `Aws\Common\Client\AbstractClient`, `Aws\Common\Client\AwsClientInterface`, `Aws\Common\Client\DefaultClient`, `Aws\Common\InstanceMetadata\InstanceMetadataClient`, `Aws\CloudFront\CloudFrontClient`, `Aws\ConfigService\ConfigServiceClient`, `Aws\DataPipeline\DataPipelineClient`, `Aws\DeviceFarm\DeviceFarmClient`, `Aws\DirectConnect\DirectConnectClient`, `Aws\DirectoryService\DirectoryServiceClient`, `Aws\DynamoDb\DynamoDbClient`, `Aws\DynamoDb_2011_12_05\DynamoDbClient`, `Aws\DynamoDbStreams\DynamoDbStreamsClient`, `Aws\Ec2\Ec2Client`, `Aws\Ecs\EcsClient`, `Aws\CloudFront_2012_05_05\CloudFrontClient`, `Aws\Efs\EfsClient`, `Aws\ElastiCache\ElastiCacheClient`, `Aws\ElasticBeanstalk\ElasticBeanstalkClient`, `Aws\ElasticFileSystem\ElasticFileSystemClient`, `Aws\ElasticLoadBalancing\ElasticLoadBalancingClient`, `Aws\ElasticTranscoder\ElasticTranscoderClient`, `Aws\Emr\EmrClient`, `Aws\Glacier\GlacierClient`, `Aws\Iam\IamClient`, `Aws\ImportExport\ImportExportClient`, `Aws\CloudHsm\CloudHsmClient`, `Aws\Kinesis\KinesisClient`, `Aws\Kms\KmsClient`, `Aws\Lambda\LambdaClient`, `Aws\MachineLearning\MachineLearningClient`, `Aws\OpsWorks\OpsWorksClient`, `Aws\Rds\RdsClient`, `Aws\Redshift\RedshiftClient`, `Aws\Route53\Route53Client`, `Aws\Route53Domains\Route53DomainsClient`, `Aws\S3\S3Client`, `Aws\CloudSearch\CloudSearchClient`, `Aws\Ses\SesClient`, `Aws\SimpleDb\SimpleDbClient`, `Aws\Sns\SnsClient`, `Aws\Sqs\SqsClient`, `Aws\Ssm\SsmClient`, `Aws\StorageGateway\StorageGatewayClient`, `Aws\Sts\StsClient`, `Aws\Support\SupportClient`, `Aws\Swf\SwfClient`, `Aws\WorkSpaces\WorkSpacesClient`, `Aws\CloudSearch_2011_02_01\CloudSearchClient`, `Guzzle\Service\Client`, `Aws\CloudSearchDomain\CloudSearchDomainClient`, `Aws\CloudTrail\CloudTrailClient`, `Aws\CloudWatch\CloudWatchClient`

Namespace: Guzzle\Common
Located at Guzzle/Common/FromConfigInterface.php

## Methods summary

- `public static` `factory ( array|Collection $config = array() )`

  Static factory method used to turn an array or collection of configuration data into an instantiated object.

## Methods detail

# `public static `Guzzle\Common\FromConfigInterface``
`factory( array|`Guzzle\Common\Collection` $config = array() )`

Static factory method used to turn an array or collection of configuration data into an instantiated object.

#### Parameters

$config
  `array|`Guzzle\Common\Collection``
  $config Configuration data

#### Returns

``Guzzle\Common\FromConfigInterface``

### Magic methods summary