@@ 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} |
|
@@ 251-264 (lines=14) @@ | ||
248 | /** |
|
249 | * {@inheritdoc} |
|
250 | */ |
|
251 | public function delete($key) |
|
252 | { |
|
253 | $this->init(); |
|
254 | ||
255 | try { |
|
256 | $this->blobProxy->deleteBlob($this->containerName, $key); |
|
257 | ||
258 | return true; |
|
259 | } catch (ServiceException $e) { |
|
260 | $this->failIfContainerNotFound($e, sprintf('delete key "%s"', $key)); |
|
261 | ||
262 | return false; |
|
263 | } |
|
264 | } |
|
265 | ||
266 | /** |
|
267 | * {@inheritdoc} |