| @@ 124-137 (lines=14) @@ | ||
| 121 | /** |
|
| 122 | * {@inheritdoc} |
|
| 123 | */ |
|
| 124 | public function read($key) |
|
| 125 | { |
|
| 126 | $this->init(); |
|
| 127 | ||
| 128 | try { |
|
| 129 | $blob = $this->blobProxy->getBlob($this->containerName, $key); |
|
| 130 | ||
| 131 | return stream_get_contents($blob->getContentStream()); |
|
| 132 | } catch (ServiceException $e) { |
|
| 133 | $this->failIfContainerNotFound($e, sprintf('read key "%s"', $key)); |
|
| 134 | ||
| 135 | return false; |
|
| 136 | } |
|
| 137 | } |
|
| 138 | ||
| 139 | /** |
|
| 140 | * {@inheritdoc} |
|
| @@ 253-266 (lines=14) @@ | ||
| 250 | /** |
|
| 251 | * {@inheritdoc} |
|
| 252 | */ |
|
| 253 | public function delete($key) |
|
| 254 | { |
|
| 255 | $this->init(); |
|
| 256 | ||
| 257 | try { |
|
| 258 | $this->blobProxy->deleteBlob($this->containerName, $key); |
|
| 259 | ||
| 260 | return true; |
|
| 261 | } catch (ServiceException $e) { |
|
| 262 | $this->failIfContainerNotFound($e, sprintf('delete key "%s"', $key)); |
|
| 263 | ||
| 264 | return false; |
|
| 265 | } |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * {@inheritdoc} |
|