public function __construct(array $config) { parent::__construct($config); $emitter = $this->getEmitter(); $emitter->attach(new QueueUrlSubscriber()); $emitter->attach(new Md5ValidatorSubscriber()); }
public function __construct(array $args) { $args['with_resolved'] = function (array $args) { $this->getHandlerList()->appendInit(CopySnapshotMiddleware::wrap($this, $args['endpoint_provider']), 'ec2.copy_snapshot'); }; parent::__construct($args); }
public function __construct(array $config) { parent::__construct($config); $list = $this->getHandlerList(); $list->appendBuild($this->queueUrl(), 'sqs.queue_url'); $list->appendSign($this->validateMd5(), 'sqs.md5'); }
public function __construct(array $args) { if (isset($args['AssociateTag'])) { $this->setAssociateTag($args['AssociateTag']); } parent::__construct($args); //$api = $this->getApi(); }
public function __construct(array $args) { $args['with_resolved'] = function (array $args) { $copySnap = new CopySnapshotSubscriber($args['endpoint_provider']); $this->getEmitter()->attach($copySnap); }; parent::__construct($args); }
public function __construct(array $args) { parent::__construct($args); // Setup middleware. $stack = $this->getHandlerList(); $stack->appendBuild($this->getApiVersionMiddleware(), 'glacier.api_version'); $stack->appendBuild($this->getChecksumsMiddleware(), 'glacier.checksum'); $stack->appendBuild(Middleware::contentType(['UploadArchive', 'UploadPart']), 'glacier.content_type'); $stack->appendInit(Middleware::sourceFile($this->getApi(), 'body', 'sourceFile'), 'glacier.source_file'); }
public function __construct(array $args) { if (!isset($args['signing_name'])) { $args['signing_name'] = 'elasticloadbalancing'; } if (!isset($args['endpoint'])) { $scheme = isset($args['scheme']) ? $args['scheme'] : 'https'; $args['endpoint'] = "{$scheme}://elasticloadbalancing.{$args['region']}.amazonaws.com"; } parent::__construct($args); }
/** * {@inheritdoc} * * In addition to the options available to * {@see Aws\AwsClient::__construct}, S3Client accepts the following * options: * * - bucket_endpoint: (bool) Set to true to send requests to a * hardcoded bucket endpoint rather than create an endpoint as a result * of injecting the bucket into the URL. This option is useful for * interacting with CNAME endpoints. * - calculate_md5: (bool) Set to false to disable calculating an MD5 * for all Amazon S3 signed uploads. * - force_path_style: (bool) Set to true to send requests using path * style bucket addressing (e.g., https://s3.amazonaws.com/bucket/key). * * @param array $args */ public function __construct(array $args) { parent::__construct($args); $em = $this->getEmitter(); $em->attach(new BucketStyleSubscriber($this->getConfig('bucket_endpoint'))); $em->attach(new PermanentRedirectSubscriber()); $em->attach(new SSECSubscriber()); $em->attach(new PutObjectUrlSubscriber()); $em->attach(new SourceFile($this->getApi())); $em->attach(new ApplyMd5Subscriber()); $em->attach(new SaveAs()); }
public function __construct(array $args) { parent::__construct($args); $api = $this->getApi(); // Add the Glacier version header required for all operations. $this->getHttpClient()->setDefaultOption('headers/x-amz-glacier-version', $api->getMetadata('apiVersion')); $em = $this->getEmitter(); // Allow for specifying bodies with file paths and file handles. $em->attach(new SourceFile($api, 'body', 'sourceFile')); // Listen for upload operations and make sure the required hash headers // are added. $em->attach(new ApplyChecksumsSubscriber()); }
/** * {@inheritdoc} * * In addition to the options available to * {@see Aws\AwsClient::__construct}, S3Client accepts the following * options: * * - bucket_endpoint: (bool) Set to true to send requests to a * hardcoded bucket endpoint rather than create an endpoint as a result * of injecting the bucket into the URL. This option is useful for * interacting with CNAME endpoints. * - calculate_md5: (bool) Set to false to disable calculating an MD5 * for all Amazon S3 signed uploads. * * @param array $args */ public function __construct(array $args) { parent::__construct($args); $stack = $this->getHandlerList(); $stack->appendInit(SSECMiddleware::wrap($this->getEndpoint()->getScheme()), 's3.ssec'); $stack->appendBuild(ApplyChecksumMiddleware::wrap(), 's3.checksum'); $stack->appendBuild(Middleware::contentType(['PutObject', 'UploadPart']), 's3.content_type'); // Use the bucket style middleware when using a "bucket_endpoint" (for cnames) if ($this->getConfig('bucket_endpoint')) { $stack->appendBuild(BucketEndpointMiddleware::wrap(), 's3.bucket_endpoint'); } $stack->appendSign(PutObjectUrlMiddleware::wrap(), 's3.put_object_url'); $stack->appendSign(PermanentRedirectMiddleware::wrap(), 's3.permanent_redirect'); $stack->appendInit(Middleware::sourceFile($this->getApi()), 's3.source_file'); $stack->appendInit($this->getSaveAsParameter(), 's3.save_as'); $stack->appendInit($this->getLocationConstraintMiddleware(), 's3.location'); }
public function __construct(array $args) { parent::__construct($args); $this->getHandlerList()->appendInit($this->cleanIdFn(), 'route53.clean_id'); }
public function __construct(array $config) { parent::__construct($config); $list = $this->getHandlerList(); $list->appendBuild($this->predictEndpoint(), 'ml.predict_endpoint'); }
public function __construct(array $args) { parent::__construct($args); $stack = $this->getHandlerList(); $stack->appendBuild([__CLASS__, '_add_accept_header']); }
public function __construct(array $args) { parent::__construct($args + ['service' => $this->getService(), 'signature_version' => 'v2']); }
public function __construct(array $args) { parent::__construct($args); $this->getEmitter()->attach(new CleanIdSubscriber()); }
public function __construct(array $args) { parent::__construct($args); $list = $this->getHandlerList(); $list->appendBuild($this->searchByPost(), 'cloudsearchdomain.search_by_POST'); }