-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathAbstractClient.php
86 lines (76 loc) · 1.82 KB
/
AbstractClient.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* @package Guzzle PHP <http://www.guzzlephp.org>
* @license See the LICENSE file that was distributed with this source code.
*/
namespace Guzzle\Aws;
use Guzzle\Service\Client;
use Guzzle\Aws\Signature\AbstractSignature;
/**
* Abstract AWS Client
*
* @author Michael Dowling <[email protected]>
*/
abstract class AbstractClient extends Client
{
/**
* @var Signature
*/
protected $signature;
/**
* @var string AWS access key ID
*/
protected $accessKey;
/**
* @var string AWS secret key
*/
protected $secretKey;
/**
* @var string Service version
*/
protected $version;
/**
* Default AWS client constructor. Clients must be created using a factory
*
* @param string $baseUrl Service base URL
* @param string $accessKey AWS access key ID
* @param string $secretKey AWS secret key
* @param string $version (optional) Service version
* @param AbstractSignature $signature (optional) AWS signature
*/
public function __construct($baseUrl, $accessKey, $secretKey, $version = null, AbstractSignature $signature = null)
{
parent::__construct($baseUrl);
$this->accessKey = $accessKey;
$this->secretKey = $secretKey;
$this->version = $version;
$this->signature = $signature;
}
/**
* Get the AWS Access Key ID
*
* @return string
*/
public function getAccessKeyId()
{
return $this->accessKey;
}
/**
* Get the AWS Secret Access Key
*
* @return string
*/
public function getSecretAccessKey()
{
return $this->secretKey;
}
/**
* Get the AWS signature object
*
* @return string
*/
public function getSignature()
{
return $this->signature;
}
}