| @@ 98-115 (lines=18) @@ | ||
| 95 | /** |
|
| 96 | * @return bool |
|
| 97 | */ |
|
| 98 | private function checkexisthead() |
|
| 99 | { |
|
| 100 | try { |
|
| 101 | $response = $this->client->head($this->link); |
|
| 102 | $this->statuscode = $response->getStatusCode(); |
|
| 103 | $this->isExist = (($this->statuscode == 200) || ($this->statuscode == 204)); |
|
| 104 | ||
| 105 | return $this->isExist; |
|
| 106 | } catch (ClientException $e) { |
|
| 107 | $this->statuscode = $e->getCode(); |
|
| 108 | } catch (RequestException $e) { |
|
| 109 | ||
| 110 | } |
|
| 111 | ||
| 112 | $this->isExist = false; |
|
| 113 | ||
| 114 | return false; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * @return bool |
|
| @@ 120-136 (lines=17) @@ | ||
| 117 | /** |
|
| 118 | * @return bool |
|
| 119 | */ |
|
| 120 | private function checkexistget() |
|
| 121 | { |
|
| 122 | try { |
|
| 123 | $response = $this->client->get($this->link); |
|
| 124 | $this->statuscode = $response->getStatusCode(); |
|
| 125 | $this->isExist = (($this->statuscode == 200) || ($this->statuscode == 204)); |
|
| 126 | ||
| 127 | return $this->isExist; |
|
| 128 | } catch (ClientException $e) { |
|
| 129 | $this->statuscode = $e->getCode(); |
|
| 130 | } catch (RequestException $e) { |
|
| 131 | } |
|
| 132 | ||
| 133 | $this->isExist = false; |
|
| 134 | ||
| 135 | return false; |
|
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * |
|