| 1 | <?php |
||
| 12 | final class Stack |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $client; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Profile[] |
||
| 21 | */ |
||
| 22 | private $profiles = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $request; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | private $response; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var bool |
||
| 36 | */ |
||
| 37 | private $failed = false; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | private $requestTarget; |
||
| 43 | 7 | ||
| 44 | /** |
||
| 45 | 7 | * @var string |
|
| 46 | 7 | */ |
|
| 47 | 7 | private $requestMethod; |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $client |
||
| 51 | * @param string $request |
||
| 52 | 1 | */ |
|
| 53 | public function __construct($client, $request) |
||
| 54 | 1 | { |
|
| 55 | $this->client = $client; |
||
| 56 | $this->request = $request; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | 4 | * @return string |
|
| 61 | */ |
||
| 62 | 4 | public function getClient() |
|
| 66 | |||
| 67 | /** |
||
| 68 | 2 | * @param Profile $profile |
|
| 69 | */ |
||
| 70 | 2 | public function addProfile(Profile $profile) |
|
| 71 | { |
||
| 72 | $this->profiles[] = $profile; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | 1 | * @return Profile[] |
|
| 77 | */ |
||
| 78 | 1 | public function getProfiles() |
|
| 79 | { |
||
| 80 | return $this->profiles; |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | 1 | * @return string |
|
| 85 | */ |
||
| 86 | 1 | public function getRequest() |
|
| 87 | { |
||
| 88 | return $this->request; |
||
| 89 | } |
||
| 90 | |||
| 91 | /** |
||
| 92 | 2 | * @return string |
|
| 93 | */ |
||
| 94 | 2 | public function getResponse() |
|
| 98 | |||
| 99 | /** |
||
| 100 | * @param string $response |
||
| 101 | */ |
||
| 102 | public function setResponse($response) |
||
| 106 | |||
| 107 | /** |
||
| 108 | 1 | * @return bool |
|
| 109 | */ |
||
| 110 | 1 | public function isFailed() |
|
| 114 | |||
| 115 | /** |
||
| 116 | * @param bool $failed |
||
| 117 | */ |
||
| 118 | public function setFailed($failed) |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @return string |
||
| 125 | */ |
||
| 126 | public function getRequestTarget() |
||
| 130 | |||
| 131 | /** |
||
| 132 | * @param string $requestTarget |
||
| 133 | */ |
||
| 134 | public function setRequestTarget($requestTarget) |
||
| 138 | |||
| 139 | /** |
||
| 140 | * @return string |
||
| 141 | */ |
||
| 142 | public function getRequestMethod() |
||
| 146 | |||
| 147 | /** |
||
| 148 | * @param string $requestMethod |
||
| 149 | */ |
||
| 150 | public function setRequestMethod($requestMethod) |
||
| 154 | } |
||
| 155 |